/* Estilos complementares — sem @apply (Tailwind via CDN) */

/* ——— Fundo apresentável ——— */
.app-page {
  position: relative;
  min-height: 100vh;
}

.app-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 10% -5%, rgba(124, 58, 237, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 5%, rgba(251, 191, 36, 0.12), transparent 50%),
    radial-gradient(ellipse 80% 45% at 50% 105%, rgba(109, 40, 217, 0.1), transparent 55%),
    linear-gradient(168deg, #faf7ff 0%, #fffdf8 38%, #f8f5ff 72%, #fefce8 100%);
}

.app-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(124, 58, 237, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}

.app-bg::after {
  content: '';
  position: absolute;
  top: 8%;
  right: 6%;
  width: min(280px, 40vw);
  height: min(280px, 40vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.12) 0%, transparent 70%);
  filter: blur(2px);
}

.app-main {
  position: relative;
}

.app-header {
  position: sticky;
}

.admin-login-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-login-screen .admin-login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 24rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 20px 50px rgba(124, 58, 237, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.04);
}

.tab-btn {
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  transition: all 0.15s;
}
@media (min-width: 640px) {
  .tab-btn { padding: 0.5rem 1rem; }
}
.tab-btn:hover {
  background: #fff;
  color: #6d28d9;
}
.tab-btn.active {
  background: #fff;
  color: #6d28d9;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  outline: 1px solid #ede9fe;
}
.tab-btn--link {
  text-decoration: none;
}
.tab-btn--danger {
  color: #dc2626 !important;
}
.tab-btn--danger:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

/* ——— Navegação admin agrupada ——— */
.app-nav {
  flex: 1;
  min-width: 0;
}
.app-nav-scroll {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 1rem;
  padding: 0.375rem;
  border-radius: 0.875rem;
  background: rgba(245, 243, 255, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(237, 233, 254, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
@media (max-width: 1023px) {
  .app-nav-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}
.app-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-shrink: 0;
}
.app-nav-group--end {
  margin-left: auto;
}
.app-nav-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 0 0.25rem;
}
.app-nav-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.app-nav-items .tab-btn {
  white-space: nowrap;
  font-size: 0.8125rem;
  padding: 0.4375rem 0.75rem;
}

.page-intro {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.tab-panel {
  animation: panel-in 0.25s ease;
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

/* ——— Toolbar visualizar escala ——— */
.escala-toolbar {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
}
@media (min-width: 640px) {
  .escala-toolbar { padding: 1.25rem 1.5rem; }
}
.escala-toolbar-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}
@media (min-width: 768px) {
  .escala-toolbar-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.escala-toolbar-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.escala-toolbar-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}
.escala-toolbar-selects {
  display: flex;
  gap: 0.5rem;
}
.escala-toolbar-selects .input {
  width: auto;
  min-width: 7rem;
}
.escala-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.escala-stats-row .stat-card {
  min-width: 5.5rem;
  padding: 0.5rem 0.75rem;
  margin: 0;
}
.escala-stats-row .stat-value {
  font-size: 1.125rem;
}
.escala-stats-row .stat-label {
  font-size: 0.625rem;
}
.escala-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.escala-toolbar-hint {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}
.escala-lista {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.escala-container {
  margin-top: 0.25rem;
}

.app-footer {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4c1d95;
  letter-spacing: -0.02em;
}
.section-desc {
  margin-top: 0.25rem;
  color: #64748b;
  line-height: 1.5;
}

.card {
  border-radius: 1.125rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  padding: 1.25rem;
  box-shadow:
    0 4px 24px rgba(124, 58, 237, 0.06),
    0 1px 3px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow:
    0 8px 32px rgba(124, 58, 237, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.05);
}
@media (min-width: 640px) {
  .card { padding: 1.5rem; }
}
.card-title {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
}

.label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

.input {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.input:focus {
  outline: none;
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.25);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.625rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 50%, #5b21b6 100%);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
  border: none;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.625rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover {
  background: #fff;
  border-color: #ddd6fe;
  color: #6d28d9;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.08);
}

.btn-icon {
  border: none;
  background: transparent;
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: #64748b;
  cursor: pointer;
}
.btn-icon:hover {
  background: #f5f3ff;
  color: #6d28d9;
}
.btn-icon.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.badge {
  border-radius: 9999px;
  background: #ede9fe;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6d28d9;
}

.num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  border-radius: 0.375rem;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6d28d9;
  font-variant-numeric: tabular-nums;
}

.table-wrap { overflow-x: auto; margin: 0 -0.25rem; }
.data-table { width: 100%; min-width: 320px; font-size: 0.875rem; border-collapse: collapse; }
.data-table th {
  border-bottom: 1px solid #f1f5f9;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.data-table td {
  border-bottom: 1px solid #f8fafc;
  padding: 0.75rem;
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }

.empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: #94a3b8;
}

.avail-tag {
  display: inline-block;
  margin: 0 0.25rem 0.25rem 0;
  border-radius: 0.375rem;
  background: #ecfdf5;
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  color: #047857;
}
.restr-tag {
  display: inline-block;
  margin-top: 0.25rem;
  border-radius: 0.375rem;
  background: #fffbeb;
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  color: #92400e;
}

.escala-card {
  border-radius: 0.75rem;
  border: 1px solid #f1f5f9;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.escala-card.weekend {
  border-left: 4px solid #8b5cf6;
}
.escala-date {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7c3aed;
}
.escala-missa {
  margin-top: 0.25rem;
  font-weight: 600;
  color: #1e293b;
}
.ministro-select {
  margin-top: 0.5rem;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
}
.ministro-select:focus {
  outline: none;
  border-color: #a78bfa;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.stat-card {
  border-radius: 0.75rem;
  border: 1px solid #f1f5f9;
  background: #fff;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.stat-value { font-size: 1.5rem; font-weight: 700; color: #7c3aed; }
.stat-label { margin-top: 0.25rem; font-size: 0.75rem; color: #64748b; }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.toast.success { background: #059669; }
.toast.error { background: #dc2626; }
.toast.info { background: #7c3aed; }
.toast.hidden { display: none; }

.avail-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border-radius: 0.5rem;
  border: 1px solid #f1f5f9;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}
.avail-check:hover {
  border-color: #ddd6fe;
  background: rgba(245, 243, 255, 0.5);
}
.avail-check:has(:checked) {
  border-color: #c4b5fd;
  background: #f5f3ff;
}
.avail-check input {
  width: 1rem;
  height: 1rem;
  accent-color: #7c3aed;
}

#pdf-content { background: #fff; padding: 0; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 10px; width: 1080px; max-width: 100%; }
#pdf-content .pdf-export-root,
#pdf-content .pdf-export-root * {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
#pdf-content h1 { font-size: 1.25rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; }
#pdf-content .pdf-meta { text-align: center; font-size: 0.875rem; color: #666; margin-bottom: 1.5rem; }
#pdf-content .pdf-day { margin-bottom: 1rem; border-bottom: 1px solid #e5e5e5; padding-bottom: 0.75rem; }
#pdf-content .pdf-day.solene { background: #fffbeb; border-radius: 0.5rem; padding: 0.75rem; }
#pdf-content .pdf-day-title { font-weight: 700; }
#pdf-content .pdf-evangelho { font-size: 0.8125rem; color: #475569; margin-top: 0.25rem; }
#pdf-content .pdf-solene { font-size: 0.6875rem; font-weight: 700; color: #b45309; text-transform: uppercase; margin-top: 0.25rem; }
#pdf-content .pdf-slot { margin-left: 1rem; margin-top: 0.25rem; font-size: 0.875rem; }

.guide-card {
  border-radius: 1rem;
  border: 1px solid #ddd6fe;
  background: linear-gradient(to bottom right, #faf5ff, #fff);
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.guide-summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: #5b21b6;
}
.guide-summary::-webkit-details-marker { display: none; }
.guide-toggle {
  font-size: 0.75rem;
  font-weight: 500;
  color: #7c3aed;
}
.guide-body { margin-top: 1rem; }
.guide-item {
  border-radius: 0.75rem;
  border: 1px solid #ede9fe;
  background: #fff;
  padding: 0.875rem;
}
.guide-item h4 {
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6d28d9;
}
.guide-item p {
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.45;
}
.guide-example {
  margin-top: 0.5rem;
  color: #64748b !important;
}
.guide-steps {
  padding-left: 1.25rem;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.6;
}
.guide-note {
  border-radius: 0.5rem;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  color: #92400e;
}

.avail-fieldset {
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  padding: 1rem;
}
.avail-mode {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.avail-mode-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #334155;
  cursor: pointer;
}
.pattern-block {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}
.pattern-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.time-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.time-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.75rem;
  cursor: pointer;
}
.time-chip:has(:checked) {
  border-color: #a78bfa;
  background: #f5f3ff;
  color: #6d28d9;
}
.avail-details summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #7c3aed;
}
.by-day-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.5rem;
  align-items: start;
}
.by-day-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  padding-top: 0.375rem;
}
.calendar-block {
  border-top: 1px dashed #e2e8f0;
  padding-top: 1rem;
}
.exc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.exc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid #f1f5f9;
  font-size: 0.8125rem;
  margin-bottom: 0.375rem;
}

.avail-minister-btn {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-size: 0.875rem;
  color: #334155;
  transition: all 0.15s;
}
.avail-minister-summary {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #6d28d9;
  line-height: 1.3;
  padding-left: 2rem;
}

.avail-grid-readonly {
  border-radius: 0.75rem;
  border: 1px solid #c4b5fd;
  background: linear-gradient(to bottom right, #f5f3ff, #fff);
  padding: 0.875rem 1rem;
}
.avail-grid-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #5b21b6;
  margin-bottom: 0.625rem;
}
.avail-grid-foot {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}
.avail-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
.avail-grid-table th,
.avail-grid-table td {
  border: 1px solid #e9d5ff;
  padding: 0.35rem 0.5rem;
  text-align: center;
}
.avail-grid-table th {
  background: #ede9fe;
  color: #5b21b6;
  font-weight: 600;
}
.avail-grid-day {
  font-weight: 700;
  text-align: left !important;
  background: #faf5ff;
  color: #6d28d9;
  white-space: nowrap;
}
.avail-grid-cell.on {
  background: #ddd6fe;
  color: #5b21b6;
  font-weight: 700;
}
.avail-grid-cell--click {
  cursor: pointer;
  user-select: none;
}
.avail-grid-cell--click:hover {
  background: #ede9fe;
}

.avail-grid-cell--disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.65;
}

.time-chip--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.time-chip--disabled .time-chip-label {
  text-decoration: line-through;
}
.avail-grid-hint {
  font-weight: 500;
  font-size: 0.6875rem;
  color: #7c3aed;
}

.avail-fieldset--month {
  border-color: #a78bfa;
  background: linear-gradient(to bottom, #faf5ff, #fff);
}

.avail-month-grid {
  min-height: 4rem;
}

.avail-month-grid .avail-universal-cal {
  width: 100%;
}

.avail-month-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr));
  gap: 0.5rem;
}

.avail-fieldset--times {
  border-color: #93c5fd;
  background: linear-gradient(to bottom, #eff6ff, #fff);
}

.avail-times-quick {
  margin-top: 0.25rem;
}

.avail-day-times-panel {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px solid #fcd34d;
  background: linear-gradient(to bottom, #fffbeb, #fff);
}

.avail-day-times-kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b45309;
  margin: 0 0 0.35rem;
}

.avail-day-times-title {
  font-size: 1rem;
  font-weight: 700;
  color: #92400e;
  margin: 0 0 0.5rem;
}

.avail-day-times-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
}

.avail-day-time-mode {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.avail-day-time-mode-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.avail-month-day.has-custom-times::after {
  content: '';
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: #f59e0b;
}

.avail-month-day {
  position: relative;
}

.avail-live-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.avail-live-day-times {
  font-size: 0.75rem;
  color: #b45309;
  font-weight: 600;
}

/* Disponibilidade: marcar à esquerda, resumo à direita */
.avail-editor-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 900px) {
  .avail-editor-layout {
    grid-template-columns: 1fr minmax(220px, 280px);
  }
}

.avail-editor-layout--admin {
  margin-top: 0.5rem;
}

.avail-editor-main {
  min-width: 0;
}

.disp-step-label,
.avail-live-panel > .disp-step-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7c3aed;
  margin: 0 0 0.5rem;
}

.disp-entry-card .card-title {
  color: #4c1d95;
}

.avail-live-panel {
  border-radius: 0.75rem;
  border: 2px solid #c4b5fd;
  background: linear-gradient(165deg, #f5f3ff 0%, #fff 55%);
  padding: 1rem 1.1rem;
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}

.avail-live-panel--admin {
  top: 1rem;
  max-height: 70vh;
}

.avail-live-kicker {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c3aed;
  margin: 0 0 0.25rem;
}

.avail-live-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #4c1d95;
  margin: 0 0 0.25rem;
}

.avail-live-period {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0;
}

.avail-live-block {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e9d5ff;
}

.avail-live-block-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #5b21b6;
  margin: 0 0 0.5rem;
}

.avail-live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  font-size: 0.6875rem;
  margin-left: 0.25rem;
}

.avail-live-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 8rem;
  overflow-y: auto;
}

.avail-live-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.375rem;
  background: #ede9fe;
  font-size: 0.75rem;
}

.avail-live-day-num {
  font-weight: 700;
  color: #4c1d95;
}

.avail-live-dow {
  color: #64748b;
  font-size: 0.6875rem;
}

.avail-live-rows {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 10rem;
  overflow-y: auto;
}

.avail-live-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.35rem;
  font-size: 0.75rem;
  align-items: baseline;
}

.avail-live-row-label {
  font-weight: 700;
  color: #5b21b6;
}

.avail-live-row-times {
  color: #334155;
}

.avail-live-empty-inline {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
  font-style: italic;
}

.avail-live-status {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  background: #f8fafc;
}

.avail-live-status--ok {
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
}

.avail-fieldset--grid {
  border-color: #a5b4fc;
  background: linear-gradient(to bottom, #f8fafc, #fff);
}

html[data-theme='dark'] .avail-live-panel {
  border-color: #6d28d9;
  background: linear-gradient(165deg, rgba(49, 46, 129, 0.5) 0%, rgba(15, 23, 42, 0.9) 55%);
}

html[data-theme='dark'] .avail-live-title,
html[data-theme='dark'] .avail-live-block-title,
html[data-theme='dark'] .avail-live-row-label {
  color: #c4b5fd;
}

html[data-theme='dark'] .avail-live-list li {
  background: rgba(91, 33, 182, 0.45);
}

html[data-theme='dark'] .avail-live-day-num {
  color: #e9d5ff;
}

.avail-live-panel-inner--admin .avail-live-title {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.avail-live-days-count {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.avail-live-chip-legend {
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #e2e8f0;
  font-size: 0.8125rem;
}

.avail-live-chip-legend p {
  margin: 0.15rem 0;
}

.avail-live-sections {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.avail-live-section--odd {
  border-left: 3px solid #7c3aed;
  padding-left: 0.5rem;
}

.avail-live-section--even {
  border-left: 3px solid #94a3b8;
  padding-left: 0.5rem;
}

.avail-live-section-title {
  margin: 0 0 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.avail-live-days-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-height: min(28vh, 14rem);
  overflow-y: auto;
}

.avail-live-day-row {
  display: grid;
  grid-template-columns: 3.25rem 2.25rem 1fr;
  gap: 0.35rem 0.5rem;
  align-items: baseline;
  padding: 0.3rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.avail-live-day-row--on {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #e2e8f0;
}

.avail-live-day-row--off {
  opacity: 0.72;
}

.avail-live-day-row--on .avail-live-day-date {
  font-weight: 700;
  color: #6d28d9;
}

.avail-live-day-mark {
  margin-left: 0.15rem;
  color: #7c3aed;
  font-size: 0.625rem;
}

html[data-theme='dark'] .avail-live-chip-legend {
  background: rgba(30, 27, 75, 0.5);
  border-color: #4c1d95;
}

html[data-theme='dark'] .avail-live-day-row--on {
  background: rgba(91, 33, 182, 0.35);
  border-color: #6d28d9;
}

html[data-theme='dark'] .avail-live-day-row--on .avail-live-day-date {
  color: #e9d5ff;
}

.avail-month-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  padding: 0.5rem 0.35rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s;
  min-height: 3.25rem;
}

.avail-month-day:hover {
  border-color: #c4b5fd;
  background: #f5f3ff;
}

.avail-month-day.is-on {
  border-color: #7c3aed;
  background: #ede9fe;
}

.avail-month-day input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.avail-month-day-num,
.avail-month-day-dow {
  position: relative;
  z-index: 0;
  pointer-events: none;
}

.avail-month-day-num {
  font-size: 1rem;
  font-weight: 700;
  color: #4c1d95;
  line-height: 1;
}

.avail-month-day-dow {
  font-size: 0.625rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}

.avail-calendar-preview {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
}

.avail-calendar-preview-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4338ca;
  margin: 0 0 0.35rem;
}

.avail-calendar-preview-list {
  font-size: 0.8125rem;
  color: #1e293b;
  margin: 0;
  line-height: 1.45;
}

.avail-calendar-preview-hint {
  font-size: 0.6875rem;
  color: #64748b;
  margin: 0.5rem 0 0;
}

html[data-theme='dark'] .avail-calendar-preview {
  border-color: #3730a3;
  background: rgba(49, 46, 129, 0.35);
}

html[data-theme='dark'] .avail-calendar-preview-title {
  color: #a5b4fc;
}

html[data-theme='dark'] .avail-calendar-preview-list {
  color: #e2e8f0;
}

.avail-month-summary {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.avail-minister-btn:hover {
  border-color: #ddd6fe;
  background: #faf5ff;
}
.avail-minister-btn.active {
  border-color: #a78bfa;
  background: #f5f3ff;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.25);
}
.avail-status {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
}
.avail-status.ok {
  background: #ecfdf5;
  color: #047857;
}
.avail-status.pending {
  background: #fef3c7;
  color: #b45309;
}

.consulta-search-card {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.consulta-page {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.consulta-hero {
  text-align: center;
  margin-bottom: 1.75rem;
}
.consulta-hero-kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7c3aed;
  margin-bottom: 0.5rem;
}
.consulta-hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #4c1d95;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
@media (min-width: 640px) {
  .consulta-hero-title { font-size: 2.25rem; }
}
.consulta-hero-desc {
  margin-top: 0.625rem;
  font-size: 0.9375rem;
  color: #64748b;
  line-height: 1.5;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}
.consulta-hero-period {
  display: inline-block;
  margin-top: 0.875rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.8125rem;
  font-weight: 600;
}

.consulta-header,
.consulta-footer {
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

.consulta-main {
  flex: 1;
  width: 100%;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}

.consulta-toolbar {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #ddd6fe;
  background: linear-gradient(to bottom, #faf5ff, #fff);
  text-align: center;
}

.consulta-toolbar-hint {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
}

.consulta-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.consulta-funcao-badge {
  flex-shrink: 0;
  border-radius: 9999px;
  background: #5b21b6;
  color: #fff;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

.consulta-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid #f1f5f9;
}

.btn-calendar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  padding: 0.625rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-calendar:active {
  transform: scale(0.98);
}

.btn-calendar--primary {
  flex: 1 1 auto;
  border: none;
  background: linear-gradient(to bottom, #7c3aed, #6d28d9);
  color: #fff;
  box-shadow: 0 1px 3px rgba(109, 40, 217, 0.35);
}

.btn-calendar--secondary {
  flex: 1 1 auto;
  border: 1px solid #ddd6fe;
  background: #fff;
  color: #6d28d9;
}

.btn-calendar-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .consulta-search-card .input {
    font-size: 1rem;
    min-height: 2.75rem;
  }

  .consulta-search-card .btn-primary {
    min-height: 2.875rem;
    font-size: 1rem;
  }

  .consulta-card {
    padding: 1rem;
  }

  .consulta-card-time {
    font-size: 1.25rem;
  }

  .consulta-card-actions {
    flex-direction: column;
  }

  .btn-calendar {
    width: 100%;
  }

  .consulta-suggestion {
    min-height: 2.75rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}

.consulta-status {
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  text-align: center;
}
.consulta-status--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}
.consulta-status--warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.consulta-status.hidden {
  display: none;
}

.consulta-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 20;
  max-height: 14rem;
  overflow-y: auto;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
.consulta-suggestion {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.625rem 0.875rem;
  text-align: left;
  font-size: 0.875rem;
  color: #334155;
  cursor: pointer;
}
.consulta-suggestion:hover {
  background: #f5f3ff;
  color: #6d28d9;
}

.consulta-card {
  border-radius: 0.75rem;
  border: 1px solid #ede9fe;
  background: #fff;
  padding: 1rem 1.125rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.consulta-card-date {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7c3aed;
}
.consulta-card-liturgy {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: #64748b;
}
.consulta-card-time {
  margin-top: 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
}
.consulta-card-you,
.consulta-card-others {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #475569;
}
.consulta-card-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.125rem;
}
.consulta-card-you strong {
  color: #6d28d9;
}

.admin-login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.admin-login-screen.hidden {
  display: none;
}
/* ——— Calendário litúrgico (admin) ——— */
.cal-layout {
  align-items: start;
}

.cal-panel {
  padding: 1.25rem;
  background: linear-gradient(165deg, #faf8ff 0%, #ffffff 45%, #fffdf8 100%);
  border: 1px solid #e9e5f5;
}

.cal-month-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #ede9fe;
}

.cal-month-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #5b21b6;
  letter-spacing: -0.02em;
  text-transform: capitalize;
}

.cal-month-hint {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.cal-weekday {
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  padding: 0.35rem 0;
}

.cal-weekday--sun {
  color: #c2410c;
}

.cal-weekday--sat {
  color: #0369a1;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.375rem;
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 4.5rem;
  aspect-ratio: 1;
  max-height: 5.5rem;
  border-radius: 0.625rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.4rem 0.45rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s, background 0.15s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.cal-day:hover:not(.cal-day--empty) {
  border-color: #a78bfa;
  background: #faf5ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12);
}

.cal-day--empty {
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: default;
  min-height: 0;
  aspect-ratio: auto;
  max-height: none;
}

.cal-day--selected {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.35);
  background: #f5f3ff;
}

.cal-day--today {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.cal-day--solene {
  border-color: #fbbf24;
  background: linear-gradient(160deg, #fffbeb 0%, #fff 70%);
}

.cal-day--festa {
  border-color: #c4b5fd;
  background: linear-gradient(160deg, #f5f3ff 0%, #fff 70%);
}

.cal-day--evangelho .cal-day-mark {
  color: #6d28d9;
}

.cal-day--sun:not(.cal-day--empty) {
  background: linear-gradient(160deg, #fff7ed 0%, #fff 65%);
}

.cal-day--sat:not(.cal-day--empty) {
  background: linear-gradient(160deg, #f0f9ff 0%, #fff 65%);
}

.cal-day-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.2rem;
}

.cal-day-num {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}

.cal-day-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  justify-content: flex-end;
}

.cal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.2rem;
  border-radius: 0.25rem;
  font-size: 0.5625rem;
  font-weight: 800;
  line-height: 1;
}

.cal-badge--solene {
  background: #f59e0b;
  color: #fff;
}

.cal-badge--festa {
  background: #8b5cf6;
  color: #fff;
}

.cal-badge--ev {
  background: #5b21b6;
  color: #fff;
}

.cal-day-mark {
  display: block;
  margin-top: auto;
  padding-top: 0.25rem;
  font-size: 0.5625rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.75rem;
  color: #64748b;
}

.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cal-legend-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

.cal-legend-dot--solene {
  background: #f59e0b;
}

.cal-legend-dot--festa {
  background: #8b5cf6;
}

.cal-legend-dot--evangelho {
  background: #7c3aed;
}

.cal-legend-ring {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  border: 2px solid #3b82f6;
  box-sizing: border-box;
}

.cal-editor-panel {
  position: sticky;
  top: 5.5rem;
  align-self: start;
}

.cal-editor-heading {
  color: #6d28d9;
}

@media (max-width: 640px) {
  .cal-day {
    min-height: 3.5rem;
    max-height: 4.25rem;
    padding: 0.3rem;
  }
  .cal-day-num {
    font-size: 0.8125rem;
  }
  .cal-day-mark {
    -webkit-line-clamp: 1;
  }
}

/* ——— Calendário semanal de missas ——— */
.missa-form-card {
  position: sticky;
  top: 5.5rem;
  align-self: start;
}
.missa-week-scroll {
  overflow-x: auto;
  margin: 0 -0.25rem;
  padding: 0 0.25rem 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.missa-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(7.5rem, 1fr));
  gap: 0.5rem;
  min-width: 100%;
}
@media (min-width: 1024px) {
  .missa-week-grid {
    min-width: 0;
  }
}
.missa-day-col {
  display: flex;
  flex-direction: column;
  min-height: 12rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: linear-gradient(to bottom, #fff, #fafafa);
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.missa-day-col--active {
  border-color: #a78bfa;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.35);
}
.missa-day-col--sun {
  border-top: 3px solid #00b0f0;
  background: linear-gradient(to bottom, #f0f9ff, #fff);
}
.missa-day-col--sat {
  border-top: 3px solid #548134;
  background: linear-gradient(to bottom, #f7faf5, #fff);
}
.missa-day-col--wd {
  border-top: 3px solid #cbd5e1;
}
.missa-day-head {
  padding: 0.5rem 0.375rem 0.375rem;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  background: rgba(255, 255, 255, 0.7);
}
.missa-day-col--sun .missa-day-head { color: #0369a1; }
.missa-day-col--sat .missa-day-head { color: #3d5c2e; }
.missa-day-slots {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.375rem;
}
.missa-day-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  color: #cbd5e1;
  font-style: italic;
  min-height: 3rem;
}
.missa-slot {
  width: 100%;
  text-align: left;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  padding: 0.375rem 0.5rem;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
.missa-slot:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.missa-slot--selected {
  outline: 2px solid #7c3aed;
  outline-offset: 1px;
}
.missa-slot-time {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
}
.missa-slot-meta {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  margin-top: 0.125rem;
  opacity: 0.85;
}
.missa-slot-tag {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.35rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.08);
}
.missa-slot--7h {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}
.missa-slot--1830 {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}
.missa-slot--mid {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
}
.missa-slot--15h {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #5b21b6;
}
.missa-slot--default {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}
.missa-day-add {
  margin: 0 0.375rem 0.375rem;
  padding: 0.35rem;
  border-radius: 0.5rem;
  border: 1px dashed #c4b5fd;
  background: rgba(245, 243, 255, 0.5);
  font-size: 0.6875rem;
  font-weight: 600;
  color: #7c3aed;
  cursor: pointer;
  transition: background 0.15s;
}
.missa-day-add:hover {
  background: #ede9fe;
}
.missa-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.missa-legend-item {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid transparent;
}
.missa-legend-item--7h { background: #ecfdf5; color: #166534; border-color: #86efac; }
.missa-legend-item--1830 { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.missa-legend-item--mid { background: #eff6ff; color: #1e40af; border-color: #93c5fd; }
.missa-legend-item--15h { background: #f5f3ff; color: #5b21b6; border-color: #c4b5fd; }
.missa-legend-item--special { background: #fffbeb; color: #92400e; border-color: #fcd34d; }

.escala-day-block {
  border-radius: 0.75rem;
  border: 1px solid #ede9fe;
  background: linear-gradient(to bottom, #faf5ff, #fff);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.escala-day-block.solene {
  border-color: #fcd34d;
  background: linear-gradient(to bottom, #fffbeb, #fff);
}
.escala-day-title {
  font-size: 1rem;
  font-weight: 700;
  color: #5b21b6;
  text-transform: capitalize;
}
.escala-evangelho {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: #475569;
}
.escala-evangelho strong {
  color: #6d28d9;
}
.escala-solene-badge {
  display: inline-block;
  margin-top: 0.375rem;
  border-radius: 9999px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
}
.funcao-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  background: #5b21b6;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.5rem;
}
.escala-funcao-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.escala-funcao-row label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 5.5rem;
}

/* ——— Impressão da escala (formato paroquial) ——— */
@media print {
  .app-bg {
    display: none !important;
  }

  body.app-page * {
    visibility: hidden;
  }

  #pdf-content.print-active,
  #pdf-content.print-active * {
    visibility: visible !important;
  }

  #pdf-content.print-active {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }

  #pdf-content.print-active .pdf-paroquial {
    font-size: 10px;
  }

  @page {
    size: A4 landscape;
    margin: 6mm;
  }
}

/* Nav com efeito vidro — legado, nav usa .app-nav-scroll */
#main-nav {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.consulta-search-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.08);
}

/* ——— Botão tema (consulta pública) ——— */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.85);
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.theme-toggle:hover {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #5b21b6;
}

.theme-toggle-text {
  display: none;
}

@media (min-width: 400px) {
  .theme-toggle-text {
    display: inline;
  }
}

/* ——— Tema escuro (página principal / consulta) ——— */
[data-theme='dark'] .app-bg {
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(45, 212, 191, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 5%, rgba(31, 111, 235, 0.1), transparent 50%),
    linear-gradient(168deg, #0d1117 0%, #161b22 50%, #0d1117 100%);
}

[data-theme='dark'] .app-bg::before {
  opacity: 0.15;
  background-image: radial-gradient(rgba(167, 139, 250, 0.12) 1px, transparent 1px);
}

[data-theme='dark'] .consulta-page {
  color: #e2e8f0;
}

[data-theme='dark'] .consulta-header {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

[data-theme='dark'] .consulta-header h1 {
  color: #ede9fe;
}

[data-theme='dark'] .consulta-header p,
[data-theme='dark'] .consulta-footer {
  color: #94a3b8;
}

[data-theme='dark'] .consulta-hero-kicker {
  color: #2dd4bf;
}

[data-theme='dark'] .consulta-hero-title {
  color: #f0f6fc;
}

[data-theme='dark'] .consulta-hero-desc {
  color: #94a3b8;
}

[data-theme='dark'] .consulta-hero-period {
  background: rgba(91, 33, 182, 0.35);
  color: #ddd6fe;
}

[data-theme='dark'] .consulta-search-card,
[data-theme='dark'] .card {
  background: #161b22;
  border-color: #30363d;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

[data-theme='dark'] .btn-primary {
  background: #2dd4bf;
  color: #0d1117;
}

[data-theme='dark'] .btn-primary:hover {
  background: #5eead4;
  color: #0d1117;
}

[data-theme='dark'] .label {
  color: #cbd5e1;
}

[data-theme='dark'] .input {
  background: #1e293b;
  border-color: #475569;
  color: #f1f5f9;
}

[data-theme='dark'] .input::placeholder {
  color: #64748b;
}

[data-theme='dark'] .empty-state {
  color: #94a3b8;
}

[data-theme='dark'] #consulta-summary {
  color: #2dd4bf;
}

[data-theme='dark'] .consulta-toolbar {
  background: linear-gradient(to bottom, rgba(91, 33, 182, 0.2), rgba(30, 41, 59, 0.9));
  border-color: rgba(167, 139, 250, 0.25);
}

[data-theme='dark'] .consulta-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme='dark'] .consulta-card-date {
  color: #e2e8f0;
}

[data-theme='dark'] .consulta-card-liturgy,
[data-theme='dark'] .consulta-card-time,
[data-theme='dark'] .consulta-card-others {
  color: #94a3b8;
}

[data-theme='dark'] .consulta-suggestions {
  background: #1e293b;
  border-color: #475569;
}

[data-theme='dark'] .consulta-suggestion {
  color: #e2e8f0;
}

[data-theme='dark'] .consulta-suggestion:hover {
  background: #334155;
}

[data-theme='dark'] .consulta-status--error {
  background: rgba(127, 29, 29, 0.4);
  color: #fecaca;
}

[data-theme='dark'] .consulta-status--warn {
  background: rgba(120, 53, 15, 0.4);
  color: #fde68a;
}

[data-theme='dark'] .theme-toggle {
  background: rgba(30, 41, 59, 0.9);
  border-color: #475569;
  color: #e2e8f0;
}

[data-theme='dark'] .theme-toggle:hover {
  background: #334155;
  border-color: #a78bfa;
  color: #ede9fe;
}

[data-theme='dark'] .btn-secondary {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}
