﻿/* Peniel App â€” Acessibilidade e temas (carrega apÃ³s Tailwind)
 * DireÃ§Ã£o 2: carvÃ£o + pÃ©rola; grenÃ¡ sÃ³ em CTA / ativo / foco. */

/* â€”â€” Tokens â€”â€” */
:root,
html.theme-dark,
html:not(.theme-light) {
  --p-bg: #0e0e10;
  --p-surface: #141416;
  --p-card: #1a1a1e;
  --p-warm: #161618;
  --p-text: #f4f3f1;
  --p-muted: #9a9a9f;
  --p-border: #2c2c32;
  --p-grena: #a31818;
  --p-grena-light: #c02828;
  --p-header-bg: rgba(14, 14, 16, 0.92);
  --p-sidebar-bg: #0e0e10;
  --p-sidebar-brand: linear-gradient(180deg, #1a1a1e 0%, #141416 55%, #0e0e10 100%);
  --p-sidebar-texture: linear-gradient(180deg, #121214 0%, #0e0e10 40%, #0e0e10 100%);
  --p-shadow: rgba(0, 0, 0, 0.4);
  --p-chrome: #121214;

  /* Canais RGB p/ Tailwind (opacidade /10, /20â€¦) */
  --p-black-rgb: 14 14 16;
  --p-surface-rgb: 20 20 22;
  --p-card-rgb: 26 26 30;
  --p-warm-rgb: 22 22 24;
  --p-grena-rgb: 163 24 24;
  --p-grena-light-rgb: 192 40 40;
  --p-muted-rgb: 154 154 159;
  --p-border-rgb: 44 44 50;
  --p-text-rgb: 244 243 241;
}

html.theme-light {
  --p-bg: #f3f2ef;
  --p-surface: #fafaf9;
  --p-card: #ffffff;
  --p-warm: #ebe9e4;
  --p-text: #161618;
  --p-muted: #4a4a52;
  --p-border: #c4c2bc;
  --p-grena: #8f1616;
  --p-grena-light: #a31818;
  --p-header-bg: #ebe9e4;
  --p-sidebar-bg: #ebe9e4;
  --p-sidebar-brand: #ebe9e4;
  --p-sidebar-texture: #ebe9e4;
  --p-shadow: rgba(0, 0, 0, 0.1);
  --p-chrome: #ebe9e4;

  --p-black-rgb: 243 242 239;
  --p-surface-rgb: 250 250 249;
  --p-card-rgb: 255 255 255;
  --p-warm-rgb: 235 233 228;
  --p-grena-rgb: 143 22 22;
  --p-grena-light-rgb: 163 24 24;
  --p-muted-rgb: 74 74 82;
  --p-border-rgb: 196 194 188;
  --p-text-rgb: 22 22 24;
}

html.a11y-high-contrast:not(.theme-light) {
  --p-bg: #000000;
  --p-surface: #000000;
  --p-card: #0a0a0a;
  --p-warm: #000000;
  --p-text: #ffffff;
  --p-muted: #e8e8e8;
  --p-border: #ffffff;
  --p-grena: #ff5555;
  --p-grena-light: #ff7777;
  --p-header-bg: #000000;
  --p-sidebar-bg: #000000;
  --p-chrome: #000000;

  --p-black-rgb: 0 0 0;
  --p-surface-rgb: 0 0 0;
  --p-card-rgb: 10 10 10;
  --p-warm-rgb: 0 0 0;
  --p-grena-rgb: 255 85 85;
  --p-grena-light-rgb: 255 119 119;
  --p-muted-rgb: 232 232 232;
  --p-border-rgb: 255 255 255;
  --p-text-rgb: 255 255 255;
}

html.a11y-high-contrast.theme-light {
  --p-bg: #ffffff;
  --p-surface: #ffffff;
  --p-card: #ffffff;
  --p-warm: #ffffff;
  --p-text: #000000;
  --p-muted: #222222;
  --p-border: #000000;
  --p-grena: #8f1616;
  --p-grena-light: #a31818;
  --p-header-bg: #ffffff;
  --p-sidebar-bg: #ffffff;
  --p-chrome: #ffffff;

  --p-black-rgb: 255 255 255;
  --p-surface-rgb: 255 255 255;
  --p-card-rgb: 255 255 255;
  --p-warm-rgb: 255 255 255;
  --p-grena-rgb: 143 22 22;
  --p-grena-light-rgb: 163 24 24;
  --p-muted-rgb: 34 34 34;
  --p-border-rgb: 0 0 0;
  --p-text-rgb: 0 0 0;
}

/* -- Widget -- */
.peniel-a11y-widget {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 120;
}

.peniel-a11y-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  left: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.8rem;
  border-radius: 1rem;
  border: 1px solid #2c2c32;
  background: #1a1a1e;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.375rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 400;
  min-width: 15rem;
  isolation: isolate;
}

html.theme-light .peniel-a11y-panel {
  border-color: #c4c2bc;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

.peniel-a11y-panel__title {
  margin: 0;
  padding: 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-text);
}

.peniel-a11y-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.peniel-a11y-panel.is-closed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.peniel-a11y-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(var(--p-border-rgb), 0.9);
  background: #141416;
  box-shadow: none;
}

html.theme-light .peniel-a11y-group {
  background: #f3f2ef;
  border-color: #c4c2bc;
}

.peniel-a11y-panel .peniel-a11y-group {
  width: 100%;
  justify-content: stretch;
}

.peniel-a11y-group--theme {
  gap: 0.3rem;
  padding: 0.35rem;
  border-radius: 0.95rem;
  border-color: rgba(var(--p-grena-rgb), 0.35);
  background: rgba(var(--p-grena-rgb), 0.1);
}

.peniel-a11y-group--a11y {
  justify-content: center;
}

html.theme-light .peniel-a11y-group--theme {
  background: rgba(143, 22, 22, 0.07);
  border-color: rgba(143, 22, 22, 0.3);
}

.peniel-a11y-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: transparent;
  color: #8a919e;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.peniel-a11y-opt--theme {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 2.45rem;
  gap: 0.35rem;
  border-radius: 0.7rem;
  padding: 0 0.35rem;
  color: var(--p-muted);
  background: #1a1a1e;
  border-color: transparent;
}

.peniel-a11y-opt__text {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}

.peniel-a11y-opt:hover {
  color: var(--p-text);
  background: rgba(255, 255, 255, 0.06);
}

.peniel-a11y-opt--theme:hover {
  color: var(--p-text);
  background: #222227;
  border-color: rgba(var(--p-border-rgb), 0.9);
}

.peniel-a11y-opt.is-active {
  border-color: rgba(var(--p-grena-rgb), 0.55);
  color: var(--p-grena);
  box-shadow: 0 0 12px rgba(var(--p-grena-rgb), 0.25);
  background: rgba(var(--p-grena-rgb), 0.12);
}

.peniel-a11y-opt--theme.is-active {
  background: var(--p-grena);
  border-color: var(--p-grena);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(var(--p-grena-rgb), 0.35);
}

html.theme-light .peniel-a11y-opt--theme {
  background: #ffffff;
  color: #3f3f46;
}

html.theme-light .peniel-a11y-opt:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--p-text);
}

html.theme-light .peniel-a11y-opt--theme:hover {
  background: #ffffff;
  border-color: #a8a49e;
}

html.theme-light .peniel-a11y-opt--theme.is-active {
  background: var(--p-grena);
  border-color: var(--p-grena);
  color: #ffffff;
}

html.theme-light .peniel-a11y-opt.is-active {
  background: rgba(143, 22, 22, 0.1);
}

.peniel-theme-trigger,
.peniel-a11y-trigger {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2.35rem !important;
  min-width: 2.35rem;
  height: 2.35rem !important;
  padding: 0 !important;
  border-radius: 9999px !important;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.peniel-theme-trigger {
  border: 2px solid rgba(155, 27, 27, 0.55) !important;
  background: #161618 !important;
  color: #f4f3f1 !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}

.peniel-a11y-trigger {
  border: 2px solid rgba(201, 162, 39, 0.85) !important;
  background: #161618 !important;
  color: #f4f3f1 !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}

.peniel-theme-trigger i,
.peniel-a11y-trigger i {
  font-size: 1rem;
  line-height: 1;
}

html.theme-light .peniel-theme-trigger {
  background: #ffffff !important;
  color: #1a1212 !important;
  border-color: rgba(143, 22, 22, 0.55) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

html.theme-light .peniel-a11y-trigger {
  background: #ffffff !important;
  color: #1a1212 !important;
  border-color: rgba(180, 140, 30, 0.95) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.peniel-theme-trigger:hover,
.peniel-theme-trigger.is-open,
.peniel-theme-trigger:focus-visible,
.peniel-a11y-trigger:hover,
.peniel-a11y-trigger.is-open,
.peniel-a11y-trigger:focus-visible {
  border-color: rgba(var(--p-grena-rgb), 0.75) !important;
  color: var(--p-grena) !important;
  background: rgba(var(--p-grena-rgb), 0.1) !important;
  box-shadow: 0 0 12px rgba(var(--p-grena-rgb), 0.2);
  outline: none;
}

html.theme-light .peniel-theme-trigger:hover,
html.theme-light .peniel-theme-trigger.is-open,
html.theme-light .peniel-theme-trigger:focus-visible,
html.theme-light .peniel-a11y-trigger:hover,
html.theme-light .peniel-a11y-trigger.is-open,
html.theme-light .peniel-a11y-trigger:focus-visible {
  background: #fff8f8 !important;
  color: var(--p-grena) !important;
}

/* Painel Acessibilidade — lista com rótulos */
.peniel-a11y-panel--opts {
  min-width: 19rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
}

.peniel-a11y-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.peniel-a11y-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background: #141416;
  color: var(--p-text);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

html.theme-light .peniel-a11y-row {
  background: #f3f2ef;
  border-color: #e5e3de;
}

.peniel-a11y-row:hover {
  border-color: rgba(var(--p-grena-rgb), 0.35);
  background: rgba(var(--p-grena-rgb), 0.08);
}

html.theme-light .peniel-a11y-row:hover {
  background: #fff8f8;
  border-color: rgba(143, 22, 22, 0.28);
}

.peniel-a11y-row.is-active {
  border-color: rgba(var(--p-grena-rgb), 0.5);
  background: rgba(var(--p-grena-rgb), 0.14);
}

html.theme-light .peniel-a11y-row.is-active {
  background: rgba(143, 22, 22, 0.08);
  border-color: rgba(143, 22, 22, 0.4);
}

.peniel-a11y-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--p-muted);
  font-size: 0.9rem;
}

html.theme-light .peniel-a11y-row__icon {
  background: #ffffff;
  color: #52525b;
  border: 1px solid #e5e3de;
}

.peniel-a11y-row.is-active .peniel-a11y-row__icon {
  color: var(--p-grena);
  background: rgba(var(--p-grena-rgb), 0.12);
}

.peniel-a11y-row__body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 auto;
}

.peniel-a11y-row__label {
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.2;
  color: var(--p-text);
}

.peniel-a11y-row__hint {
  font-size: 0.68rem;
  line-height: 1.25;
  color: var(--p-muted);
}

.peniel-a11y-row__switch {
  position: relative;
  flex-shrink: 0;
  width: 2.1rem;
  height: 1.2rem;
  border-radius: 9999px;
  background: #3a3a40;
  transition: background 0.15s ease;
}

html.theme-light .peniel-a11y-row__switch {
  background: #d4d1cb;
}

.peniel-a11y-row__switch::after {
  content: '';
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 9999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.peniel-a11y-row.is-active .peniel-a11y-row__switch {
  background: var(--p-grena);
}

.peniel-a11y-row.is-active .peniel-a11y-row__switch::after {
  transform: translateX(0.9rem);
}

@media (max-width: 640px) {
  .peniel-a11y-panel {
    position: fixed;
    right: 0.75rem;
    top: 4.25rem;
    flex-direction: column;
    transform: translateY(0) translateX(0.75rem);
    background: #1a1a1e;
    z-index: 500;
  }

  html.theme-light .peniel-a11y-panel {
    background: #ffffff;
  }

  .peniel-a11y-panel.is-open {
    transform: translateY(0) translateX(0);
  }

  .peniel-a11y-group {
    width: 100%;
    justify-content: center;
    padding: 0.375rem 0.5rem;
  }
}

/* â€”â€” Base: corpo e shell â€”â€” */
html.theme-light body.peniel-app {
  color: var(--p-text) !important;
  background: var(--p-bg, #f5f4f2) !important;
}

html.theme-light #app-shell {
  color: var(--p-text) !important;
  background: var(--p-sidebar-bg, #eeedea) !important;
}

html.theme-dark body.peniel-app {
  color: var(--p-text);
  background: var(--p-bg);
}

/* â€”â€” Nav: Ã­cones neutros; grenÃ¡ sÃ³ no ativo â€”â€” */
#sidebar .nav-link .pi,
#sidebar .nav-sublink .pi,
#sidebar .accordion-trigger .pi {
  color: var(--p-muted) !important;
}

#sidebar .nav-link:hover .pi,
#sidebar .nav-sublink:hover .pi,
#sidebar .accordion-trigger:hover .pi {
  color: var(--p-text) !important;
}

#sidebar .nav-link.is-active,
#sidebar .nav-link.is-active .pi,
#sidebar .nav-sublink.is-active,
#sidebar .nav-sublink.is-active .pi {
  color: var(--p-grena) !important;
}

#page-header-icon.pi,
#page-header-icon {
  color: var(--p-muted) !important;
}

html.theme-light main[role="main"] {
  color: var(--p-text);
  border: none !important;
  border-radius: 0 !important;
  border-top-left-radius: 1.25rem !important;
  box-shadow: none !important;
  background-color: var(--p-surface, #ffffff) !important;
}

/* â€”â€” Header â€”â€” */
html.theme-light #app-header {
  background: var(--p-header-bg, #ffffff) !important;
  border: none !important;
  border-bottom: none !important;
  color: var(--p-text) !important;
}

html.theme-light #page-header-label {
  color: var(--p-text) !important;
}

/* â€”â€” Sidebar (completo) â€”â€” */
html.theme-light #sidebar {
  background-color: var(--peniel-chrome-bg, var(--p-sidebar-bg)) !important;
  border: none !important;
  border-right: none !important;
  color: var(--p-text) !important;
}

html.theme-light #sidebar .sidebar-bg {
  background: var(--peniel-chrome-bg, var(--p-chrome, #eeedea)) !important;
}

html.theme-light #sidebar .sidebar-bg-glow {
  display: none !important;
}

html.theme-light #sidebar-header,
html.theme-light #sidebar .sidebar-brand {
  border: none !important;
  border-bottom: none !important;
  background: transparent !important;
}

html.theme-light #sidebar .sidebar-brand-btn {
  box-shadow: none !important;
  background: transparent !important;
}

html.theme-light #sidebar .sidebar-brand-bg {
  background: transparent !important;
}

html.theme-light #sidebar .sidebar-brand-veins,
html.theme-light #sidebar .sidebar-brand-shine {
  display: none !important;
}

/* Links e acordeÃµes do menu */
html.theme-light #sidebar .nav-link,
html.theme-light #sidebar .nav-sublink,
html.theme-light #sidebar .accordion-trigger {
  color: var(--p-muted) !important;
}

html.theme-light #sidebar .nav-link:hover,
html.theme-light #sidebar .nav-sublink:hover,
html.theme-light #sidebar .accordion-trigger:hover {
  color: var(--p-text) !important;
}

html.theme-light #sidebar .nav-link.is-active,
html.theme-light #sidebar .nav-sublink.is-active {
  color: var(--p-grena) !important;
  background: rgba(155, 27, 27, 0.08) !important;
  border-color: rgba(155, 27, 27, 0.35) !important;
}

html.theme-light #sidebar .accordion-panel {
  border-color: var(--p-border) !important;
}

html.theme-light #sidebar .text-white {
  color: var(--p-text) !important;
}

html.theme-light #sidebar .text-peniel-muted,
html.theme-light #sidebar .accordion-icon {
  color: var(--p-muted) !important;
}

html.theme-light #sidebar .text-peniel-grena,
html.theme-light #sidebar .pi.text-peniel-grena {
  color: var(--p-muted) !important;
}

html.theme-light #sidebar .nav-link.is-active,
html.theme-light #sidebar .nav-link.is-active .pi,
html.theme-light #sidebar .nav-sublink.is-active,
html.theme-light #sidebar .nav-sublink.is-active .pi,
html.theme-light #sidebar .nav-link.is-active .text-peniel-grena {
  color: var(--p-grena) !important;
}

html.theme-light #sidebar [class*="border-peniel-border"] {
  border-color: var(--p-border) !important;
}

html.theme-light #sidebar .btn-icon {
  background: #ffffff !important;
  border-color: #b8b5b0 !important;
  color: #2f2f35 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

html.theme-light #sidebar .btn-icon:hover {
  border-color: var(--p-grena) !important;
  color: var(--p-grena) !important;
  background: rgba(143, 22, 22, 0.06) !important;
}

/* â€”â€” UtilitÃ¡rios Tailwind peniel (global) â€”â€” */
html.theme-light [class*="bg-peniel-black"] {
  background-color: var(--p-bg) !important;
}

html.theme-light [class*="bg-peniel-surface"] {
  background-color: var(--p-surface) !important;
}

html.theme-light [class*="bg-peniel-card"] {
  background-color: var(--p-card) !important;
}

html.theme-light [class*="border-peniel-border"] {
  border-color: var(--p-border) !important;
}

html.theme-light .text-peniel-muted {
  color: var(--p-muted) !important;
}

html.theme-light .text-peniel-grena,
html.theme-light .peniel-label {
  color: var(--p-grena) !important;
}

html.theme-light .text-white {
  color: var(--p-text) !important;
}

html.theme-light [class*="text-white/"] {
  color: rgba(26, 18, 18, 0.9) !important;
}

/* â€”â€” Cards e painÃ©is â€”â€” */
html.theme-light .peniel-card,
html.theme-light .peniel-form-card,
html.theme-light .peniel-modal-box,
html.theme-light .peniel-list-item,
html.theme-light .biblio-item,
html.theme-light .holyrics-hub-card,
html.theme-light .peniel-aviso-card,
html.theme-light .biblia-reader-panel,
html.theme-light .biblia-command-bar,
html.theme-light .biblia-nav-overlay,
html.theme-light .template-page {
  background: linear-gradient(145deg, #ffffff 0%, #f5f2ef 100%) !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
  box-shadow: 0 8px 32px var(--p-shadow) !important;
}

html.theme-light .peniel-card-hero {
  background: linear-gradient(145deg, #fff5f5 0%, #ffffff 50%, #f7f5f4 100%) !important;
  border-color: rgba(155, 27, 27, 0.2) !important;
  color: var(--p-text) !important;
}

html.theme-light .peniel-card-hero::after {
  background: radial-gradient(circle, rgba(155, 27, 27, 0.08) 0%, transparent 70%) !important;
  opacity: 1 !important;
}

html.theme-light .peniel-card-hero h3,
html.theme-light .peniel-card-hero .peniel-stat-value,
html.theme-light .peniel-card-hero .text-white,
html.theme-light .peniel-card .text-white,
html.theme-light .peniel-aviso-card h4,
html.theme-light .peniel-aviso-card .text-white,
html.theme-light .view-panel header h2.text-white {
  color: var(--p-text) !important;
}

html.theme-light [class*="bg-peniel-warm"] {
  background: rgba(155, 27, 27, 0.06) !important;
}

html.theme-light .peniel-icon-badge {
  background: rgba(155, 27, 27, 0.08) !important;
  border-color: rgba(155, 27, 27, 0.25) !important;
  color: var(--p-grena) !important;
}

html.theme-light .peniel-chip-link:hover,
html.theme-light #dash-perfil-edit:hover {
  color: var(--p-grena) !important;
}

html.theme-light .btn-outline:hover {
  background: var(--p-btn-secondary-hover) !important;
  color: var(--p-text) !important;
  border-color: rgba(var(--p-grena-rgb), 0.48) !important;
}

html.theme-light .peniel-card-accent {
  background: var(--p-warm) !important;
  border-color: rgba(155, 27, 27, 0.25) !important;
}

html.theme-light .peniel-section-title,
html.theme-light .peniel-stat-value,
html.theme-light .view-panel h1,
html.theme-light .view-panel h2,
html.theme-light .view-panel h3,
html.theme-light .view-panel h4 {
  color: var(--p-text) !important;
}

html.theme-light .peniel-empty {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: var(--p-border) !important;
  color: var(--p-muted) !important;
}

html.theme-light .peniel-badge {
  background: rgba(155, 27, 27, 0.08) !important;
  border-color: rgba(155, 27, 27, 0.35) !important;
  color: var(--p-grena) !important;
}

html.theme-light .peniel-stat {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: var(--p-border) !important;
}

html.theme-light .peniel-chip {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: var(--p-border) !important;
  color: var(--p-muted) !important;
}

/* â€”â€” FormulÃ¡rios e botÃµes â€”â€” */
html.theme-light .biblia-input,
html.theme-light .biblia-select,
html.theme-light .biblia-ref-search-input {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
}

html.theme-light .btn-icon {
  background: #ffffff !important;
  border-color: #b8b5b0 !important;
  color: #2f2f35 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

html.theme-light .btn-icon:hover {
  border-color: var(--p-grena) !important;
  color: var(--p-grena) !important;
  background: rgba(143, 22, 22, 0.06) !important;
}

html.theme-light .btn-outline {
  border-color: var(--p-btn-secondary-border) !important;
  color: var(--p-btn-secondary-text) !important;
  background: var(--p-btn-secondary-bg) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

html.theme-light .btn-ghost {
  color: #2f2f35 !important;
  background: #ffffff !important;
  border-color: #b8b5b0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

html.theme-light .btn-ghost:hover,
html.theme-light .btn-ghost:focus-visible {
  color: var(--p-grena) !important;
  background: rgba(143, 22, 22, 0.06) !important;
  border-color: rgba(143, 22, 22, 0.4) !important;
}

html.theme-light .social-pill-btn {
  border-color: #b8b5b0 !important;
  color: #2f2f35 !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

html.theme-light .social-dropdown {
  background: #ffffff !important;
  border-color: #b8b5b0 !important;
}

html.theme-light .social-icon {
  border-color: #b8b5b0 !important;
  color: #2f2f35 !important;
  background: #ffffff !important;
}

html.theme-light .biblio-filter-btn,
html.theme-light .biblio-section-tab,
html.theme-light .biblia-view-tab,
html.theme-light .lit-mode-btn {
  border-color: #b8b5b0 !important;
  color: #2f2f35 !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

html.theme-light .biblio-filter-btn.is-active,
html.theme-light .biblio-section-tab.is-active,
html.theme-light .biblia-view-tab.is-active,
html.theme-light .lit-mode-btn.is-active {
  border-color: var(--p-grena) !important;
  background: rgba(155, 27, 27, 0.1) !important;
  color: var(--p-grena) !important;
}

html.theme-light .estudo-check-item {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: var(--p-border) !important;
}

html.theme-light .estudo-check-item.is-done {
  background: rgba(155, 27, 27, 0.06) !important;
  border-color: rgba(155, 27, 27, 0.3) !important;
}

html.theme-light .peniel-formatted-text {
  color: var(--p-text);
}

html.theme-light .peniel-card-accent .peniel-formatted-text {
  color: var(--p-text) !important;
}

html.theme-light .estudo-progress-bar {
  background: rgba(0, 0, 0, 0.08) !important;
}

/* â€”â€” BÃ­blia (pills e leitor) â€”â€” */
html.theme-light .biblia-morph-pill,
html.theme-light .biblia-pill,
html.theme-light .biblia-segment,
html.theme-light .biblia-nav-chip {
  border-color: #b8b5b0 !important;
  color: #2f2f35 !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

html.theme-light .biblia-morph-pill.is-active,
html.theme-light .biblia-pill.is-active,
html.theme-light .biblia-nav-chip.is-active {
  border-color: var(--p-grena) !important;
  background: rgba(155, 27, 27, 0.1) !important;
  color: var(--p-grena) !important;
}

html.theme-light .biblia-continuar {
  background: var(--p-surface) !important;
  border-color: var(--p-border) !important;
}

/* CTAs da BÃ­blia: mesmo sistema global (texto branco no primary). */
html.theme-light #biblia-view .btn-primary {
  color: #ffffff !important;
  background: var(--p-btn-primary-bg) !important;
  border-color: var(--p-btn-primary-border) !important;
  box-shadow: 0 2px 8px var(--p-btn-primary-shadow) !important;
}

html.theme-light #biblia-view .btn-primary:hover,
html.theme-light #biblia-view .btn-primary:focus-visible {
  color: #ffffff !important;
  background: var(--p-btn-primary-hover) !important;
  border-color: var(--p-btn-primary-hover) !important;
}

html.theme-light .icone-info:hover,
html.theme-light .icone-info:focus-visible {
  background: rgba(155, 27, 27, 0.1) !important;
  border-color: rgba(155, 27, 27, 0.55) !important;
  color: var(--p-grena) !important;
}

html.theme-light .biblia-mode-btn--pulpito.is-active,
html.theme-light .biblia-mode-btn--pulpito:hover:not(:disabled),
html.theme-light .biblia-mode-btn--leitura.is-active,
html.theme-light .biblia-mode-btn--leitura:hover:not(:disabled) {
  color: var(--p-grena) !important;
  background: rgba(155, 27, 27, 0.1) !important;
}

/* â€”â€” CalendÃ¡rio (modo claro) â€”â€” */
html.theme-light .lit-cal-cell {
  color: var(--p-muted) !important;
}

html.theme-light .lit-cal-cell:hover {
  color: var(--p-text) !important;
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: var(--p-border) !important;
}

html.theme-light .lit-cal-cell.is-selected {
  background: rgba(155, 27, 27, 0.12) !important;
  border-color: var(--p-grena) !important;
  color: var(--p-grena) !important;
  font-weight: 600;
}

html.theme-light .lit-cal-cell.is-today {
  box-shadow: 0 0 0 2px rgba(155, 27, 27, 0.45) !important;
}

html.theme-light .lit-cal-cell.is-today.is-selected {
  color: var(--p-grena) !important;
  background: rgba(155, 27, 27, 0.14) !important;
}

html.theme-light .lit-mode-btn:hover {
  color: var(--p-grena) !important;
  background: rgba(155, 27, 27, 0.06) !important;
}

html.theme-light .lit-cal-cell.has-event .lit-cal-dot {
  background: var(--p-grena) !important;
}

/* â€”â€” BÃ­blia: navegaÃ§Ã£o anterior / prÃ³ximo â€”â€” */
html.theme-light .biblia-view-tabs {
  background: rgba(255, 255, 255, 0.96) !important;
}

html.theme-light .biblia-verse-actions {
  background: rgba(155, 27, 27, 0.04) !important;
}

html.theme-light .biblia-fullscreen-close {
  background: var(--p-surface) !important;
  border-color: var(--p-border) !important;
  color: var(--p-muted) !important;
}

html.theme-light .biblia-fullscreen-close:hover {
  border-color: var(--p-grena) !important;
  color: var(--p-grena) !important;
}

html.theme-light #biblia-nav-sticky {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: var(--p-border) !important;
}

html.theme-light .biblia-sticky-nav-btn {
  color: var(--p-muted) !important;
  background: var(--p-surface) !important;
  border-color: var(--p-border) !important;
}

html.theme-light .biblia-sticky-nav-btn:hover:not(:disabled) {
  color: var(--p-grena) !important;
  border-color: var(--p-grena) !important;
  background: rgba(155, 27, 27, 0.08) !important;
}

html.theme-light .biblia-sticky-ref-btn {
  color: var(--p-muted) !important;
}

html.theme-light .biblia-sticky-ref-btn:hover:not(:disabled) {
  color: var(--p-grena) !important;
  border-color: var(--p-border) !important;
}

/* Modo pÃºlpito â€” texto legÃ­vel no tema claro */
html.theme-light #biblia-view.biblia-pulpit-mode .biblia-pulpit-verse-line,
html.theme-light #biblia-view.biblia-pulpit-mode .biblia-single-verse p,
html.theme-light #biblia-view.biblia-pulpit-mode .biblia-pulpit-range,
html.theme-light #biblia-view.biblia-pulpit-mode #biblia-texto {
  color: var(--p-text) !important;
}

/* Evita hover:text-white ilegÃ­vel em fundo claro */
html.theme-light .hover\:text-white:hover:not(.btn-outline):not(.btn-primary) {
  color: var(--p-text) !important;
}

html.theme-light #dash-culto-passagem-link:hover {
  color: var(--p-grena) !important;
}

html.theme-light #sidebar-backdrop {
  background: rgba(0, 0, 0, 0.45) !important;
}

/* â€”â€” Alto contraste (global + sidebar) â€”â€” */
html.a11y-high-contrast body.peniel-app {
  background: var(--p-bg) !important;
  color: var(--p-text) !important;
}

html.a11y-high-contrast #sidebar,
html.a11y-high-contrast #app-header,
html.a11y-high-contrast .peniel-card,
html.a11y-high-contrast .peniel-form-card,
html.a11y-high-contrast .peniel-modal-box,
html.a11y-high-contrast .peniel-empty,
html.a11y-high-contrast .template-page,
html.a11y-high-contrast .biblia-reader-panel,
html.a11y-high-contrast .biblia-command-bar,
html.a11y-high-contrast .btn-outline,
html.a11y-high-contrast .btn-icon,
html.a11y-high-contrast .biblia-input,
html.a11y-high-contrast .social-pill-btn,
html.a11y-high-contrast .social-dropdown,
html.a11y-high-contrast .nav-link,
html.a11y-high-contrast .nav-sublink,
html.a11y-high-contrast .accordion-trigger,
html.a11y-high-contrast .accordion-panel {
  border-width: 2px !important;
  border-color: var(--p-border) !important;
}

html.a11y-high-contrast #sidebar {
  background-color: var(--p-sidebar-bg) !important;
}

html.a11y-high-contrast #sidebar .nav-link,
html.a11y-high-contrast #sidebar .nav-sublink,
html.a11y-high-contrast #sidebar .accordion-trigger,
html.a11y-high-contrast .text-peniel-muted,
html.a11y-high-contrast .peniel-stat-label {
  color: var(--p-muted) !important;
  opacity: 1 !important;
  font-weight: 500 !important;
}

html.a11y-high-contrast .text-white,
html.a11y-high-contrast .peniel-section-title,
html.a11y-high-contrast #page-header-label,
html.a11y-high-contrast #sidebar .text-white {
  color: var(--p-text) !important;
}

html.a11y-high-contrast .peniel-label,
html.a11y-high-contrast .text-peniel-grena {
  color: var(--p-grena) !important;
  font-weight: 700 !important;
}

html.a11y-high-contrast .nav-link.is-active,
html.a11y-high-contrast .nav-sublink.is-active {
  outline: 2px solid var(--p-grena) !important;
  outline-offset: 1px;
}

/* â€”â€” Texto grande â€”â€” */
html.a11y-large-text {
  font-size: 112.5%;
}

html.a11y-large-text #sidebar .nav-link,
html.a11y-large-text #sidebar .nav-sublink,
html.a11y-large-text #sidebar .accordion-trigger {
  font-size: 1rem;
}

html.a11y-large-text .peniel-section-title {
  font-size: 1.75rem;
}

/* â€”â€” Sem animaÃ§Ãµes â€”â€” */
html.a11y-no-motion .peniel-a11y-panel,
html.a11y-no-motion .peniel-a11y-trigger,
html.a11y-no-motion #sidebar,
html.a11y-no-motion #app-shell,
html.a11y-no-motion #sidebar-backdrop {
  transition: none !important;
}

html.a11y-no-motion *,
html.a11y-no-motion *::before,
html.a11y-no-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

html.a11y-no-motion .sidebar-brand-btn:hover {
  transform: none !important;
}

/* â€”â€” Devocional (estudos / planos) â€”â€” */
html.theme-light .devocional-hero {
  background: linear-gradient(135deg, rgba(155, 27, 27, 0.08) 0%, var(--p-card) 45%, var(--p-warm) 100%) !important;
}

html.theme-light .devocional-hero-title,
html.theme-light .devocional-read-title {
  color: var(--p-text) !important;
}

html.theme-light .devocional-hero-ring-label {
  color: var(--p-text) !important;
}

html.theme-light .devocional-read-card {
  background: var(--p-surface) !important;
}

html.theme-light .devocional-read-card.is-current {
  background: rgba(155, 27, 27, 0.06) !important;
}

html.theme-light .devocional-read-status {
  background: var(--p-warm) !important;
}

html.theme-light .devocional-ring-bg {
  stroke: rgba(0, 0, 0, 0.08);
}

html.theme-light .devocional-subtabs {
  background: var(--p-surface) !important;
}

html.theme-light .devocional-subtab.is-active {
  background: rgba(155, 27, 27, 0.1) !important;
}

html.theme-light .devocional-archive-card {
  background: rgba(155, 27, 27, 0.04) !important;
}

/* =========================================================
   Modo claro â€” checkup geral (componentes @apply / hardcoded)
   ========================================================= */

/* â€”â€” Restaurar branco em CTAs e telas ao vivo â€”â€” */
html.theme-light .btn-primary,
html.theme-light .peniel-play-btn,
html.theme-light .holyrics-go-btn:not(.holyrics-go-btn--outline),
html.theme-light .holyrics-go-btn.is-live,
html.theme-light .devocional-read-btn,
html.theme-light .holyrics-live-text,
html.theme-light .holyrics-live-screen .text-white,
html.theme-light .holyrics-status-ar--live {
  color: #ffffff !important;
}

html.theme-light .holyrics-go-btn--outline {
  color: var(--p-btn-secondary-text) !important;
  background: var(--p-btn-secondary-bg) !important;
  border-color: var(--p-btn-secondary-border) !important;
}

html.theme-light .holyrics-go-btn--outline:hover,
html.theme-light .holyrics-go-btn--outline.is-live {
  color: var(--p-text) !important;
  background: var(--p-btn-secondary-hover) !important;
  border-color: rgba(var(--p-grena-rgb), 0.48) !important;
}

/* â€”â€” Login â€”â€” */
html.theme-light .peniel-login-view {
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(var(--p-grena-rgb), 0.06) 0%, transparent 55%),
    linear-gradient(180deg, #fafaf9 0%, #f5f4f2 50%, #eeedea 100%) !important;
  color: var(--p-text) !important;
}

html.theme-light .peniel-login-card,
html.theme-light .peniel-login-card .text-white,
html.theme-light .peniel-login-card h1,
html.theme-light .peniel-login-card h2,
html.theme-light .peniel-login-card label {
  color: var(--p-text) !important;
}

html.theme-light .peniel-login-card .text-peniel-muted,
html.theme-light .peniel-login-card .peniel-muted {
  color: var(--p-muted) !important;
}

/* â€”â€” Labels / chips / dashboard â€”â€” */
html.theme-light .peniel-field-label,
html.theme-light .peniel-stat-label,
html.theme-light .peniel-empty-state,
html.theme-light .peniel-empty p {
  color: var(--p-muted) !important;
}

html.theme-light .peniel-chip-tag {
  background: var(--p-bg) !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
}

html.theme-light .peniel-chip-tag span {
  color: var(--p-muted) !important;
}

html.theme-light .dash-quick-btn,
html.theme-light .dash-home-welcome,
html.theme-light .dash-escala-item,
html.theme-light .dash-aviso-item {
  background: #ffffff !important;
  border-color: #b8b5b0 !important;
  color: var(--p-text) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

html.theme-light .dash-quick-btn:hover {
  border-color: rgba(155, 27, 27, 0.5) !important;
  color: var(--p-grena) !important;
  background: #fff8f8 !important;
}

html.theme-light .dash-escala-empty {
  color: var(--p-muted) !important;
  border-color: var(--p-border) !important;
}

/* Dashboard â€” light: Vou/NÃ£o vou, agenda, tabs, badges */
html.theme-light .dash-home-welcome {
  background: #ffffff !important;
  border: 1px solid #c4c2bc !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

html.theme-light .dash-verse-day {
  border-color: rgba(143, 22, 22, 0.28) !important;
  background:
    linear-gradient(145deg, rgba(143, 22, 22, 0.07) 0%, #ffffff 48%, #faf8f6 100%) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

html.theme-light .dash-verse-day__label {
  color: var(--p-grena) !important;
}

html.theme-light .dash-verse-day__text {
  color: #1f1e22 !important;
}

html.theme-light .dash-verse-day__ref {
  color: #52525b !important;
}

html.theme-light .dash-freshness {
  color: #6b7280 !important;
}

html.theme-light .dash-section-count.is-hot {
  color: #b45309 !important;
}

html.theme-light .dash-pending-cta {
  border-color: rgba(217, 119, 6, 0.45) !important;
  background: #fffbeb !important;
  color: #92400e !important;
}

html.theme-light .dash-pending-cta strong {
  color: #78350f !important;
}

html.theme-light .dash-next-hero__card {
  border-color: rgba(143, 22, 22, 0.3) !important;
  background: linear-gradient(135deg, rgba(143, 22, 22, 0.08) 0%, #ffffff 45%, #faf8f6 100%) !important;
}

html.theme-light .dash-next-hero__empty {
  border-color: #c4c2bc !important;
  background: #ffffff !important;
}

html.theme-light .dash-next-hero__kicker {
  color: var(--p-grena) !important;
}

html.theme-light .dash-next-hero__title,
html.theme-light .dash-next-hero__papel,
html.theme-light .dash-empty-block .text-white\/90,
html.theme-light .dash-next-hero__empty .text-white\/90 {
  color: var(--p-text) !important;
}

html.theme-light .dash-next-hero__meta {
  color: #52525b !important;
}

html.theme-light .dash-item-link {
  color: var(--p-grena) !important;
}

html.theme-light .dash-skeleton__line {
  background: linear-gradient(90deg, #ebe9e4, #f5f4f2, #ebe9e4) !important;
  background-size: 200% 100% !important;
}

html.theme-light .dash-medal__progress-track {
  background: #e7e5e0 !important;
}

html.theme-light .dash-tabs {
  border-color: #c4c2bc !important;
  background: #ebe9e4 !important;
}

html.theme-light .dash-tab {
  color: #3f3f46 !important;
  background: transparent !important;
}

html.theme-light .dash-tab:hover {
  color: var(--p-text) !important;
  background: rgba(255, 255, 255, 0.7) !important;
}

html.theme-light .dash-tab.is-active {
  color: #ffffff !important;
  background: var(--p-grena) !important;
}

html.theme-light .dash-confirm-btn {
  border: 1px solid #a8a49e !important;
  background: #ffffff !important;
  color: #1f1e22 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

html.theme-light .dash-confirm-btn:hover {
  border-color: #78716c !important;
  color: #111827 !important;
  background: #f5f4f2 !important;
}

html.theme-light .dash-confirm-btn.is-vou {
  border-color: #059669 !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
}

html.theme-light .dash-confirm-btn.is-nao {
  border-color: #ea580c !important;
  background: #fff7ed !important;
  color: #c2410c !important;
}

html.theme-light .dash-confirm-badge--vou,
html.theme-light .esc-confirm-badge--vou {
  border-color: #059669 !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
}

html.theme-light .dash-confirm-badge--nao,
html.theme-light .esc-confirm-badge--nao {
  border-color: #ea580c !important;
  background: #fff7ed !important;
  color: #c2410c !important;
}

html.theme-light .esc-confirm-badge--pendente {
  border-color: #a8a49e !important;
  background: #f5f4f2 !important;
  color: #44403c !important;
}

html.theme-light .dash-agenda-item {
  border: 1px solid #c4c2bc !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  color: var(--p-text) !important;
}

html.theme-light .dash-agenda-item:hover {
  border-color: rgba(143, 22, 22, 0.4) !important;
  background: #fff8f8 !important;
}

html.theme-light .dash-agenda-item .text-white,
html.theme-light .dash-agenda-item .font-display,
html.theme-light .dash-agenda-item strong {
  color: var(--p-text) !important;
}

html.theme-light .dash-agenda-item .text-peniel-muted,
html.theme-light .dash-agenda-item .text-xs {
  color: #52525b !important;
}

html.theme-light .dash-agenda-badge--culto {
  border-color: rgba(143, 22, 22, 0.55) !important;
  background: rgba(143, 22, 22, 0.1) !important;
  color: #8f1616 !important;
}

html.theme-light .dash-agenda-badge--evento {
  border-color: rgba(3, 105, 161, 0.45) !important;
  background: rgba(14, 165, 233, 0.12) !important;
  color: #0369a1 !important;
}

html.theme-light .avisos-card__unread {
  border-color: #d97706 !important;
  background: #fef3c7 !important;
  color: #92400e !important;
}
html.theme-light .avisos-card__confirm {
  border-top-color: rgba(15, 23, 42, 0.1);
}

html.theme-light .avisos-filters {
  border-color: rgba(15, 23, 42, 0.12) !important;
  background: #f4f4f5 !important;
}
html.theme-light .avisos-filter {
  color: #71717a !important;
}
html.theme-light .avisos-filter:hover {
  color: #18181b !important;
}
html.theme-light .avisos-filter.is-active {
  color: #fff !important;
  background: rgba(155, 27, 27, 0.85) !important;
}
html.theme-light .avisos-card__menu-panel {
  background: #fff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}
html.theme-light .avisos-card__menu-item {
  color: #18181b !important;
}
html.theme-light .avisos-card__menu-item:hover {
  background: #f4f4f5 !important;
}
html.theme-light .avisos-sound-acc__title {
  color: var(--p-text) !important;
}
html.theme-light .avisos-card__type {
  color: #71717a !important;
}

html.theme-light .dash-aviso-item.is-unread,
html.theme-light .avisos-card.is-unread {
  border-color: rgba(217, 119, 6, 0.55) !important;
  background: #fffbeb !important;
}

html.theme-light .dash-aviso-item.is-unread:hover,
html.theme-light .avisos-card.is-unread:hover {
  border-color: rgba(217, 119, 6, 0.75) !important;
  background: #fef3c7 !important;
}

html.theme-light .dash-stat-card {
  border-color: #c4c2bc !important;
  background: #ffffff !important;
}

html.theme-light .dash-stat-card__label {
  color: #52525b !important;
}

html.theme-light .dash-stat-card__value {
  color: var(--p-text) !important;
}

html.theme-light #dash-escalas-prev,
html.theme-light #dash-escalas-next {
  background: #ffffff !important;
  border-color: #a8a49e !important;
  color: #1f1e22 !important;
}

html.theme-light .peniel-card .btn-outline {
  background: #ffffff !important;
  border-color: #a8a49e !important;
  color: #1f1e22 !important;
}

/* â€”â€” User menu / dropdowns â€”â€” */
html.theme-light .user-menu-dropdown {
  background: var(--p-surface) !important;
  border-color: var(--p-border) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12) !important;
}

html.theme-light .user-menu-dropdown__heading,
html.theme-light .user-menu-dropdown__heading--section {
  color: var(--p-muted) !important;
}

html.theme-light .user-menu-dropdown__item {
  color: var(--p-text) !important;
}

html.theme-light .user-menu-dropdown__item:hover {
  background: rgba(155, 27, 27, 0.08) !important;
  color: var(--p-grena) !important;
}

html.theme-light .user-menu-dropdown__item i {
  color: var(--p-grena) !important;
}

/* â€”â€” Dialogs â€”â€” */
html.theme-light .peniel-dialog__head {
  border-color: var(--p-border) !important;
}

html.theme-light .peniel-dialog__field label,
html.theme-light .peniel-dialog__hint {
  color: var(--p-muted) !important;
}

html.theme-light .peniel-dialog__field input,
html.theme-light .peniel-dialog__field textarea,
html.theme-light .peniel-dialog__field select {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
}

html.theme-light .peniel-dialog__icon {
  border-color: rgba(155, 27, 27, 0.3) !important;
  background: rgba(155, 27, 27, 0.08) !important;
  color: var(--p-grena) !important;
}

/* â€”â€” Cultos â€”â€” */
html.theme-light .cultos-proximo-card {
  background: var(--p-surface) !important;
  border-color: var(--p-border) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
  color: var(--p-text) !important;
}

html.theme-light .cultos-proximo-card__body:hover {
  background: rgba(155, 27, 27, 0.04) !important;
}

html.theme-light .cultos-proximo-card__actions {
  border-color: var(--p-border) !important;
  background: var(--p-warm) !important;
}

html.theme-light .cultos-proximo-card__title,
html.theme-light .cult-edit-title,
html.theme-light .cult-edit-section__title,
html.theme-light .cult-lit-musica-item__title,
html.theme-light .cult-edit-passagem__text,
html.theme-light .cult-esc-acc__title {
  color: var(--p-text) !important;
}

html.theme-light .cultos-proximo-card__date,
html.theme-light .cultos-proximo-card__meta,
html.theme-light .cult-edit-kicker,
html.theme-light .cult-edit-section__desc,
html.theme-light .cult-edit-field,
html.theme-light .cult-edit-field__label,
html.theme-light .cult-lit-musica-item__artist,
html.theme-light .cult-esc-acc__hint,
html.theme-light .cult-esc-acc__chevron,
html.theme-light .cult-edit-empty,
html.theme-light .cult-esc-acc__note {
  color: var(--p-muted) !important;
}

html.theme-light .cultos-badge {
  color: var(--p-muted) !important;
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: var(--p-border) !important;
}

html.theme-light .cultos-badge--rec {
  color: var(--p-grena) !important;
  background: rgba(155, 27, 27, 0.08) !important;
  border-color: rgba(155, 27, 27, 0.3) !important;
}

html.theme-light .cultos-detail-tab,
html.theme-light .cult-edit-tab {
  color: var(--p-muted) !important;
  border-color: transparent !important;
}

html.theme-light .cultos-detail-tab:hover,
html.theme-light .cult-edit-tab:hover {
  color: var(--p-text) !important;
}

html.theme-light .cultos-detail-tab.is-active,
html.theme-light .cult-edit-tab.is-active {
  color: var(--p-grena) !important;
  background: rgba(155, 27, 27, 0.08) !important;
  border-color: rgba(155, 27, 27, 0.35) !important;
}

html.theme-light .cult-edit-section,
html.theme-light .cult-edit-header,
html.theme-light .cult-edit-tabs,
html.theme-light .cult-edit-mode-badge,
html.theme-light .cult-edit-passagem,
html.theme-light .cult-edit-media-slot,
html.theme-light .cult-lou-inst-row,
html.theme-light .cult-lit-busca-resultados,
html.theme-light .cult-lit-musica-item,
html.theme-light .cult-esc-acc,
html.theme-light .cult-esc-acc__summary,
html.theme-light .cultos-config-cal-wrap {
  background: var(--p-surface) !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
  box-shadow: none !important;
}

html.theme-light .cult-edit-section {
  background: #faf8f6 !important;
  border-color: var(--p-border) !important;
}

html.theme-light .cult-edit-section__icon {
  background: rgba(155, 27, 27, 0.08) !important;
  border-color: rgba(155, 27, 27, 0.25) !important;
  color: var(--p-grena) !important;
}

html.theme-light .cult-edit-section__head {
  border-color: var(--p-border) !important;
}

html.theme-light .cult-esc-acc__summary:hover,
html.theme-light .cult-esc-acc[open] > .cult-esc-acc__summary {
  background: rgba(155, 27, 27, 0.05) !important;
}

html.theme-light .cult-edit-field__hint,
html.theme-light .cult-pick-chips__empty {
  color: var(--p-muted) !important;
}

html.theme-light .cult-pick-chip {
  color: var(--p-text) !important;
  background: rgba(143, 24, 24, 0.08) !important;
}

html.theme-light .cult-media-upload {
  border-color: var(--p-border) !important;
  color: var(--p-muted) !important;
}

html.theme-light .cult-banco-media-item {
  border-color: var(--p-border) !important;
  background: rgba(0, 0, 0, 0.02) !important;
}

html.theme-light .cult-banco-media-item span {
  color: var(--p-text) !important;
}

html.theme-light .cult-field,
html.theme-light .cult-escala-input,
html.theme-light select.cult-field,
html.theme-light .cult-field select,
html.theme-light .cult-edit-file {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
  color: #1a1412 !important;
  -webkit-text-fill-color: #1a1412 !important;
}

html.theme-light .cult-field::placeholder,
html.theme-light .cult-escala-input::placeholder {
  color: #7a716a !important;
  opacity: 1;
  -webkit-text-fill-color: #7a716a !important;
}

html.theme-light .cult-edit--readonly .cult-field,
html.theme-light .cult-edit--readonly .cult-edit-file {
  background: var(--p-bg) !important;
  color: #1a1412 !important;
  -webkit-text-fill-color: #1a1412 !important;
}

html.theme-light .cult-lit-busca-item {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
}

html.theme-light .cult-lit-busca-item:hover,
html.theme-light .cult-lit-busca-item.border-peniel-grena {
  background: rgba(155, 27, 27, 0.06) !important;
  border-color: rgba(155, 27, 27, 0.4) !important;
}

html.theme-light .cult-lit-musica-remove {
  color: var(--p-grena) !important;
  border-color: rgba(155, 27, 27, 0.35) !important;
  background: rgba(155, 27, 27, 0.06) !important;
}

html.theme-light .cultos-badge--extra {
  color: #92400e !important;
  background: rgba(245, 158, 11, 0.15) !important;
}

html.theme-light .cultos-proximo-card__btn--edit {
  color: #075985 !important;
  background: rgba(14, 165, 233, 0.1) !important;
  border-color: rgba(14, 165, 233, 0.4) !important;
}

html.theme-light .cultos-proximo-card__btn--delete {
  color: #b91c1c !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

html.theme-light .cultos-detail-card .peniel-chip-tag,
html.theme-light #lit-detail-escalas .peniel-chip-tag {
  background: var(--p-bg) !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
}

html.theme-light .cultos-detail-card .peniel-chip-tag span,
html.theme-light #lit-detail-escalas .peniel-chip-tag span {
  color: var(--p-muted) !important;
}

html.theme-light .cultos-detail-card .text-white,
html.theme-light .cultos-detail-card [class*="text-white"] {
  color: var(--p-text) !important;
}

/* â€”â€” Bancos / mÃ­dia â€”â€” */
html.theme-light .banco-media-card,
html.theme-light .midia-bank-card {
  background: linear-gradient(145deg, #ffffff 0%, #f5f2ef 100%) !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
}

html.theme-light .banco-media-thumb,
html.theme-light .midia-bank-thumb {
  background: var(--p-warm) !important;
}

html.theme-light .banco-media-meta h4,
html.theme-light .midia-bank-meta h4,
html.theme-light .banco-modal__title {
  color: var(--p-text) !important;
}

html.theme-light .banco-media-meta p,
html.theme-light .midia-bank-meta p,
html.theme-light .banco-hint,
html.theme-light .banco-field label,
html.theme-light .banco-table__letra {
  color: var(--p-muted) !important;
}

html.theme-light .banco-icon-btn,
html.theme-light .midia-bank-menu-btn {
  border-color: #b8b5b0 !important;
  background: #ffffff !important;
  color: #2f2f35 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

html.theme-light .banco-icon-btn:hover,
html.theme-light .midia-bank-menu-btn:hover,
html.theme-light .midia-bank-menu-item:hover {
  color: var(--p-grena) !important;
  border-color: rgba(155, 27, 27, 0.45) !important;
  background: #fff8f8 !important;
}

html.theme-light .banco-table thead th {
  background: rgba(0, 0, 0, 0.04) !important;
  color: var(--p-muted) !important;
  border-color: var(--p-border) !important;
}

html.theme-light .banco-table tbody td {
  color: var(--p-text) !important;
  border-color: var(--p-border) !important;
}

html.theme-light .config-subtabs {
  border-color: var(--p-border) !important;
  background: #e8e6e1 !important;
}

html.theme-light .config-subtab {
  color: #2f2f35 !important;
  border: 1px solid transparent;
}

html.theme-light .config-subtab:hover,
html.theme-light .config-subtab:focus-visible {
  color: var(--p-text) !important;
  background: rgba(255, 255, 255, 0.7) !important;
}

html.theme-light .config-subtab.is-active {
  background: #ffffff !important;
  border-color: rgba(143, 22, 22, 0.35) !important;
  color: var(--p-grena) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

html.theme-light .config-identity-card,
html.theme-light .config-identity-grid {
  border-color: rgba(143, 22, 22, 0.22) !important;
}

html.theme-light .config-identity-grid {
  border-bottom-color: var(--p-border) !important;
}

html.theme-light .config-identity-title {
  color: var(--p-text) !important;
}

html.theme-light .config-identity-hint,
html.theme-light .config-identity-meta {
  color: var(--p-muted) !important;
}

html.theme-light .config-identity-kbd {
  border-color: var(--p-border) !important;
  background: #f3f2ef !important;
  color: var(--p-text) !important;
}

html.theme-light #midia-igreja-logo-preview,
html.theme-light .config-identity-preview {
  background: #141414 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: rgba(255, 255, 255, 0.55) !important;
}

html.theme-light .config-identity-preview.has-logo {
  border-color: rgba(143, 22, 22, 0.45) !important;
}

html.theme-light .config-identity-card .text-white,
html.theme-light .config-identity-card h3 {
  color: var(--p-text) !important;
}

html.theme-light .banco-modal__panel {
  background: linear-gradient(180deg, #ffffff 0%, #f7f4f2 100%) !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
}

html.theme-light .banco-modal__head,
html.theme-light .banco-modal__actions {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
}

html.theme-light .banco-modal__close {
  color: var(--p-muted) !important;
}

html.theme-light .user-pick-help {
  color: var(--p-muted) !important;
}

html.theme-light .user-pick__face {
  border-color: var(--p-border) !important;
  background: rgba(0, 0, 0, 0.03) !important;
}

html.theme-light .user-pick:hover .user-pick__face {
  border-color: rgba(143, 24, 24, 0.45) !important;
  background: rgba(143, 24, 24, 0.06) !important;
}

html.theme-light .user-pick__title {
  color: var(--p-text) !important;
}

html.theme-light .user-pick__hint {
  color: var(--p-muted) !important;
}

html.theme-light .user-pick__check {
  border-color: rgba(92, 83, 77, 0.45) !important;
}

html.theme-light .user-pick__input:checked + .user-pick__face,
html.theme-light .user-pick.is-on .user-pick__face {
  border-color: rgba(143, 24, 24, 0.75) !important;
  background: rgba(143, 24, 24, 0.1) !important;
  box-shadow: inset 0 0 0 1px rgba(143, 24, 24, 0.12) !important;
}

html.theme-light .user-pick__input:checked + .user-pick__face .user-pick__check,
html.theme-light .user-pick.is-on .user-pick__check {
  border-color: var(--p-grena, #8f1818) !important;
  background: var(--p-grena, #8f1818) !important;
  color: #fff !important;
}

html.theme-light .min-role-row {
  border-color: var(--p-border) !important;
  background: rgba(0, 0, 0, 0.02) !important;
}

html.theme-light .min-role-row.is-active,
html.theme-light .min-role-row:has(input.user-pick__input[value="MEMBRO"]:checked),
html.theme-light .min-role-row:has(input.user-pick__input[value="LIDER"]:checked) {
  border-color: rgba(143, 24, 24, 0.45) !important;
  background: rgba(143, 24, 24, 0.07) !important;
}

html.theme-light .min-role-row__name {
  color: var(--p-text) !important;
}

html.theme-light .banco-tag,
html.theme-light .midia-filter-pill {
  border-color: var(--p-border) !important;
  color: var(--p-muted) !important;
  background: var(--p-surface) !important;
}

html.theme-light .midia-filter-pill:hover,
html.theme-light .midia-filter-pill.is-active {
  color: var(--p-grena) !important;
  border-color: rgba(155, 27, 27, 0.45) !important;
  background: rgba(155, 27, 27, 0.08) !important;
}

html.theme-light .midia-bank-menu {
  background: var(--p-surface) !important;
  border-color: var(--p-border) !important;
}

html.theme-light .midia-bank-menu-item {
  color: var(--p-text) !important;
}

/* â€”â€” Holyrics (chrome; telÃ£o ao vivo permanece escuro) â€”â€” */
html.theme-light .holyrics-desk-tabs,
html.theme-light .holyrics-bg-menu,
html.theme-light .holyrics-hotkeys-bar,
html.theme-light .holyrics-aviso-popover,
html.theme-light .holyrics-next-preview {
  background: var(--p-surface) !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
}

html.theme-light .holyrics-desk-tab,
html.theme-light .holyrics-hotkeys-bar__item,
html.theme-light .holyrics-hotkey-item__label,
html.theme-light .holyrics-setlist-item,
html.theme-light .holyrics-web-source-btn,
html.theme-light .holyrics-msg-preset,
html.theme-light .holyrics-preview-tool,
html.theme-light .holyrics-tactical-btn {
  color: var(--p-muted) !important;
}

html.theme-light .holyrics-desk-tab:hover,
html.theme-light .holyrics-setlist-item:hover,
html.theme-light .holyrics-web-source-btn:hover,
html.theme-light .holyrics-msg-preset:hover {
  color: var(--p-text) !important;
}

html.theme-light .holyrics-desk-tab.is-active,
html.theme-light .holyrics-setlist-item.is-active,
html.theme-light .holyrics-web-source-btn.is-active,
html.theme-light .holyrics-timer-tab.is-active {
  color: var(--p-grena) !important;
  background: rgba(155, 27, 27, 0.08) !important;
  border-color: rgba(155, 27, 27, 0.35) !important;
}

html.theme-light .holyrics-slide-card,
html.theme-light .holyrics-bg-thumb,
html.theme-light .holyrics-media-card,
html.theme-light .holyrics-file-upload-btn {
  background: var(--p-surface) !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
}

html.theme-light .holyrics-slide-card__text,
html.theme-light .holyrics-media-card p {
  color: var(--p-text) !important;
}

html.theme-light .holyrics-slide-card__num,
html.theme-light .holyrics-hotkeys-bar__icon {
  color: var(--p-muted) !important;
}

html.theme-light .holyrics-slide-card.is-active {
  border-color: rgba(155, 27, 27, 0.5) !important;
  background: rgba(155, 27, 27, 0.06) !important;
}

html.theme-light .holyrics-hotkeys-bar__item kbd,
html.theme-light .holyrics-hotkey-item__key {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
}

html.theme-light .holyrics-status-ar--off {
  background: #e8e4e0 !important;
  border-color: #b8b0a8 !important;
  color: #5c5550 !important;
}

html.theme-light .holyrics-strip-nav {
  border-color: var(--p-border) !important;
  color: var(--p-muted) !important;
  background: var(--p-surface) !important;
}

html.theme-light .holyrics-strip-nav:hover {
  color: var(--p-grena) !important;
  border-color: rgba(155, 27, 27, 0.45) !important;
}

html.theme-light .holyrics-bg-menu__item {
  color: var(--p-muted) !important;
}

html.theme-light .holyrics-bg-menu__item:hover {
  background: rgba(155, 27, 27, 0.08) !important;
  color: var(--p-text) !important;
}

html.theme-light #holyrics-bank-picker-modal > div,
html.theme-light #holyrics-timer-modal > div,
html.theme-light #biblia-ninja-modal > div {
  background: linear-gradient(180deg, #ffffff 0%, #f7f4f2 100%) !important;
  border-color: rgba(155, 27, 27, 0.35) !important;
  color: var(--p-text) !important;
}

html.theme-light #holyrics-bank-picker-modal .text-white,
html.theme-light #holyrics-timer-modal .text-white,
html.theme-light #biblia-ninja-modal .text-white {
  color: var(--p-text) !important;
}

/* Previews de projeÃ§Ã£o: manter fundo escuro legÃ­vel */
html.theme-light .holyrics-float-previews,
html.theme-light #holyrics-float-telao,
html.theme-light #holyrics-float-palco,
html.theme-light .holyrics-live-screen,
html.theme-light .holyrics-preview-screen {
  background: #000000 !important;
  color: #ffffff !important;
}

html.theme-light .holyrics-float-previews .text-white,
html.theme-light .holyrics-live-screen .text-white,
html.theme-light #holyrics-float-telao-text,
html.theme-light #holyrics-float-palco-atual {
  color: #ffffff !important;
}

/* â€”â€” Louvor / Banco de Louvores + Hub do MÃºsico â€”â€” */
html.theme-light #banco-musicas-view,
html.theme-light #louvor-musica-detalhe-view {
  color: var(--p-text);
}

html.theme-light #banco-musicas-view .peniel-section-title,
html.theme-light #louvor-musica-detalhe-view #louvor-detail-title,
html.theme-light #louvor-musica-detalhe-view h2,
html.theme-light #louvor-musica-detalhe-view h3,
html.theme-light #louvor-rep-modal-title {
  color: var(--p-text) !important;
}

html.theme-light .louvor-detail-pill,
html.theme-light .louvor-detail-tabs,
html.theme-light .louvor-study-item__icon,
html.theme-light .louvor-study-btn,
html.theme-light .gestao-vol-card,
html.theme-light .gestao-slot,
html.theme-light .louvor-rep-card {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
}

html.theme-light .louvor-rep-card {
  background: linear-gradient(145deg, #ffffff 0%, #f7f5f3 100%) !important;
}

html.theme-light .louvor-rep-card:hover {
  border-color: rgba(143, 22, 22, 0.45) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

html.theme-light .louvor-rep-card .text-white,
html.theme-light .louvor-rep-card h3,
html.theme-light .louvor-rep-card h4,
html.theme-light .louvor-rep-card strong.text-white,
html.theme-light .louvor-detail-pill strong,
html.theme-light .louvor-detail-pill .text-white {
  color: var(--p-text) !important;
}

html.theme-light .louvor-rep-card [class*="bg-peniel-black"],
html.theme-light #banco-musicas-view [class*="bg-peniel-black"],
html.theme-light #louvor-musica-detalhe-view [class*="bg-peniel-black"] {
  background-color: rgba(0, 0, 0, 0.04) !important;
}

html.theme-light .louvor-detail-tab,
html.theme-light .louvor-study-item__meta,
html.theme-light .louvor-rep-action {
  color: var(--p-muted) !important;
}

html.theme-light .louvor-rep-action.btn-outline,
html.theme-light .louvor-rep-card .btn-outline,
html.theme-light #louvor-musica-detalhe-view .btn-outline {
  color: var(--p-grena) !important;
  border-color: rgba(143, 22, 22, 0.4) !important;
  background: #ffffff !important;
}

html.theme-light .louvor-rep-action.btn-outline:hover,
html.theme-light .louvor-rep-card .btn-outline:hover,
html.theme-light #louvor-musica-detalhe-view .btn-outline:hover {
  background: rgba(143, 22, 22, 0.08) !important;
  color: var(--p-grena) !important;
}

html.theme-light .louvor-detail-tabs {
  background: #f3f2ef !important;
  border-color: var(--p-border) !important;
  box-shadow: none !important;
}

html.theme-light .louvor-detail-tab:hover {
  color: var(--p-text) !important;
}

html.theme-light .louvor-detail-tab.is-active {
  color: var(--p-grena) !important;
  background: rgba(143, 22, 22, 0.08) !important;
  border-bottom-color: var(--p-grena) !important;
}

html.theme-light .louvor-study-item__label {
  color: var(--p-text) !important;
}

html.theme-light .louvor-cifra-viewer,
html.theme-light .louvor-cifra-editor {
  background: #ffffff !important;
  color: var(--p-text) !important;
  border-color: var(--p-border) !important;
}

html.theme-light .louvor-cifra-editor::placeholder {
  color: rgba(92, 92, 98, 0.7) !important;
}

html.theme-light .louvor-detail-panel footer,
html.theme-light #louvor-detail-panel-cifra > div:first-child {
  background: #f3f2ef !important;
  border-color: var(--p-border) !important;
}

html.theme-light .louvor-rep-tag-pill {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
  color: var(--p-muted) !important;
}

html.theme-light .louvor-rep-tag-pill.is-active {
  border-color: rgba(143, 22, 22, 0.65) !important;
  background: rgba(143, 22, 22, 0.1) !important;
  color: var(--p-grena) !important;
}

html.theme-light #louvor-rep-modal {
  background: rgba(22, 22, 24, 0.45) !important;
}

html.theme-light #louvor-rep-modal .peniel-modal-box {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.18) !important;
}

html.theme-light #louvor-rep-modal .border-peniel-border\/60,
html.theme-light #louvor-rep-modal [class*="border-peniel-border"] {
  border-color: var(--p-border) !important;
}

/* Links de ensaio / sanfonas */
html.theme-light .louvor-guide-acc__summary {
  border-color: rgba(143, 22, 22, 0.28) !important;
  background: linear-gradient(135deg, rgba(143, 22, 22, 0.1), #ffffff) !important;
  color: var(--p-text) !important;
}

html.theme-light .louvor-guide-acc[open] .louvor-guide-acc__summary {
  border-color: rgba(143, 22, 22, 0.5) !important;
  background: linear-gradient(135deg, rgba(143, 22, 22, 0.16), #fff8f8) !important;
}

html.theme-light .louvor-guide-acc__chevron {
  color: var(--p-muted) !important;
}

html.theme-light .louvor-guide-row {
  border-color: var(--p-border) !important;
  background: #fafaf9 !important;
}

html.theme-light .louvor-guide-row__label {
  color: var(--p-text) !important;
}

html.theme-light .louvor-study-btn {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
  color: var(--p-text) !important;
  box-shadow: none !important;
}

html.theme-light .louvor-study-btn:hover {
  border-color: rgba(143, 22, 22, 0.45) !important;
  color: var(--p-grena) !important;
}

html.theme-light .louvor-guide-accordions {
  border-color: var(--p-border) !important;
}

html.theme-light #louvor-detail-back:hover {
  color: var(--p-grena) !important;
}

/* Player modal no light mode */
html.theme-light .louvor-player-modal {
  background: rgba(22, 22, 24, 0.4) !important;
}

html.theme-light .louvor-player-sheet {
  background: #ffffff !important;
  color: var(--p-text) !important;
  border-color: var(--p-border) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2) !important;
}

html.theme-light .louvor-player-sheet__header,
html.theme-light .louvor-player-modes,
html.theme-light .louvor-player-sheet__footer {
  background: #f3f2ef !important;
  border-color: var(--p-border) !important;
}

html.theme-light .louvor-player-sheet__title,
html.theme-light .louvor-player-speed-block__label strong {
  color: var(--p-text) !important;
}

html.theme-light .louvor-player-sheet__meta,
html.theme-light .louvor-player-stats,
html.theme-light .louvor-player-speed-block__label {
  color: var(--p-muted) !important;
}

html.theme-light .louvor-player-close,
html.theme-light .louvor-player-mode,
html.theme-light .louvor-player-speed,
html.theme-light .louvor-player-metro {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
  color: var(--p-muted) !important;
}

html.theme-light .louvor-player-mode.is-active,
html.theme-light .louvor-player-speed.is-active,
html.theme-light .louvor-player-metro.is-muted {
  border-color: rgba(143, 22, 22, 0.55) !important;
  background: rgba(143, 22, 22, 0.1) !important;
  color: var(--p-grena) !important;
}

html.theme-light .louvor-rep-delete {
  border-color: rgba(185, 28, 28, 0.35) !important;
  background: rgba(185, 28, 28, 0.06) !important;
  color: #b91c1c !important;
}

html.theme-light .louvor-rep-sidebar,
html.theme-light .louvor-rep-detail-pane {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
}

html.theme-light .louvor-rep-sidebar__search {
  border-bottom-color: var(--p-border) !important;
}

html.theme-light .louvor-rep-tag-filter-label {
  color: var(--p-muted) !important;
}

html.theme-light .louvor-rep-tag-filter-pill {
  border-color: var(--p-border) !important;
  background: #f3f2ef !important;
  color: var(--p-text) !important;
}

html.theme-light .louvor-rep-tag-filter-pill:hover {
  border-color: rgba(143, 22, 22, 0.4) !important;
  background: #fff !important;
  color: var(--p-grena) !important;
}

html.theme-light .louvor-rep-tag-filter-pill.is-active {
  border-color: rgba(143, 22, 22, 0.7) !important;
  background: rgba(143, 22, 22, 0.12) !important;
  color: var(--p-grena) !important;
}

html.theme-light .louvor-rep-empty {
  color: var(--p-muted) !important;
}

html.theme-light .louvor-rep-list-item:hover {
  background: rgba(143, 22, 22, 0.05) !important;
}

html.theme-light .louvor-rep-list-item.is-selected {
  background: rgba(143, 22, 22, 0.1) !important;
  border-color: rgba(143, 22, 22, 0.35) !important;
}

html.theme-light .louvor-rep-list-item__title {
  color: var(--p-text) !important;
}

html.theme-light .louvor-rep-list-item__meta {
  color: var(--p-muted) !important;
}

html.theme-light .louvor-rep-list-item__icon {
  background: #f7f5f3 !important;
  border-color: var(--p-border) !important;
  color: var(--p-muted) !important;
}

html.theme-light .louvor-rep-detail-empty .text-white,
html.theme-light .louvor-rep-detail-empty .font-display {
  color: var(--p-text) !important;
}

html.theme-light .louvor-detail-tag-chip {
  background: rgba(143, 22, 22, 0.1) !important;
  border-color: rgba(143, 22, 22, 0.35) !important;
  color: var(--p-grena) !important;
}

html.theme-light .louvor-detail-edit-meta {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
  color: var(--p-muted) !important;
}

html.theme-light .louvor-detail-edit-meta:hover {
  border-color: rgba(143, 22, 22, 0.45) !important;
  color: var(--p-grena) !important;
}

html.theme-light .peniel-dialog__pill {
  background: #ffffff !important;
  border-color: var(--p-border) !important;
  color: var(--p-muted) !important;
}

html.theme-light .peniel-dialog__pill.is-active {
  background: rgba(143, 22, 22, 0.1) !important;
  border-color: rgba(143, 22, 22, 0.4) !important;
  color: var(--p-grena) !important;
}

html.theme-light .louvor-player-stage,
html.theme-light .louvor-player-scroll {
  background: #fafaf9 !important;
}

html.theme-light .louvor-player-line {
  color: rgba(22, 22, 24, 0.28) !important;
  text-shadow: none !important;
}

html.theme-light .louvor-player-line.is-past {
  color: rgba(22, 22, 24, 0.42) !important;
}

html.theme-light .louvor-player-line.is-current {
  color: var(--p-text) !important;
  text-shadow: none !important;
}

html.theme-light .louvor-player-scroll.is-cifra .louvor-player-line.is-current {
  background: rgba(143, 22, 22, 0.1) !important;
  color: var(--p-text) !important;
}

html.theme-light .louvor-player-pulse {
  background: var(--p-grena) !important;
}

/* â€”â€” BÃ­blia extras â€”â€” */
html.theme-light .biblia-view-tab:hover,
html.theme-light .biblio-section-tab:hover,
html.theme-light .biblio-filter-btn:hover {
  color: var(--p-text) !important;
}

html.theme-light .devocional-hero-sub,
html.theme-light .devocional-read-ver,
html.theme-light .devocional-check-wrap,
html.theme-light .lit-cal-dow {
  color: var(--p-muted) !important;
}

html.theme-light .devocional-check-wrap:hover {
  color: var(--p-text) !important;
}

html.theme-light .lit-cal-cell {
  background: var(--p-surface) !important;
  color: var(--p-text) !important;
  border-color: var(--p-border) !important;
}

/* â€”â€” Tabelas / listas genÃ©ricas â€”â€” */
html.theme-light table.banco-table,
html.theme-light .peniel-table {
  color: var(--p-text) !important;
}

html.theme-light .peniel-list-item:hover {
  background: rgba(155, 27, 27, 0.06) !important;
}

/* â€”â€” Inputs genÃ©ricos em superfÃ­cies claras â€”â€” */
html.theme-light input.biblia-input,
html.theme-light textarea.biblia-input,
html.theme-light select.biblia-input,
html.theme-light .biblia-input {
  background: #ffffff !important;
  color: var(--p-text) !important;
  border-color: var(--p-border) !important;
}

html.theme-light .biblia-input::placeholder {
  color: var(--p-muted) !important;
  opacity: 0.7;
}

/* â€”â€” Placeholder / empty states â€”â€” */
html.theme-light .peniel-empty-state,
html.theme-light [id$="-empty"] {
  color: var(--p-muted) !important;
}

/* â€”â€” Sidebar labels mais legÃ­veis â€”â€” */
html.theme-light #sidebar .nav-link,
html.theme-light #sidebar .nav-sublink,
html.theme-light #sidebar .accordion-trigger {
  color: #3f3a36 !important;
}

html.theme-light #sidebar .nav-link:hover,
html.theme-light #sidebar .nav-sublink:hover,
html.theme-light #sidebar .accordion-trigger:hover {
  color: var(--p-text) !important;
}

/* â€”â€” Texto muted um pouco mais forte no conteÃºdo â€”â€” */
html.theme-light .text-peniel-muted,
html.theme-light .peniel-muted {
  color: var(--p-muted) !important;
}

html.theme-light [class*="text-white/50"],
html.theme-light [class*="text-white/60"],
html.theme-light [class*="text-white/70"],
html.theme-light [class*="text-white/80"],
html.theme-light [class*="text-white/90"] {
  color: rgba(26, 20, 18, 0.78) !important;
}

/* â€”â€” Fix layout topbar (mata vÃ£o preto / linhas / alturas) â€”â€” */
#app-shell {
  background: var(--p-sidebar-bg, #eeedea) !important;
}
#app-header,
#sidebar-header,
#sidebar-header.sidebar-brand {
  height: var(--peniel-topbar-h, 56px) !important;
  min-height: var(--peniel-topbar-h, 56px) !important;
  max-height: var(--peniel-topbar-h, 56px) !important;
  border: none !important;
  border-bottom: none !important;
}
#app-header {
  overflow: visible !important;
}
#sidebar-header,
#sidebar-header.sidebar-brand {
  overflow: hidden !important;
}
#sidebar {
  border: none !important;
  border-right: none !important;
}
#sidebar::before,
#sidebar::after,
#app-shell > main[role="main"]::before,
#app-shell > main[role="main"]::after {
  display: none !important;
  content: none !important;
}
#app-shell > main[role="main"] {
  border: none !important;
  border-radius: 0 !important;
  border-top-left-radius: 1.25rem !important;
  box-shadow: none !important;
  background-color: var(--p-surface, #ffffff) !important;
}
.sidebar-brand-btn,
.sidebar-brand-logo {
  box-shadow: none !important;
  background: transparent !important;
  filter: none !important;
}

/* Marca d'Ã¡gua da igreja â€” contraste automÃ¡tico por tema */
#peniel-watermark,
.peniel-watermark {
  opacity: 0.32;
  filter: none;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

/* Logo clara (texto branco) â†’ no light mode inverte luminÃ¢ncia e preserva o grenÃ¡ */
html.theme-light #peniel-watermark.is-light-ink,
html.theme-light .peniel-watermark.is-light-ink {
  opacity: 0.48;
  filter: invert(1) hue-rotate(180deg) contrast(1.05);
}

/* Logo escura â†’ no dark mode inverte para nÃ£o sumir no fundo preto */
html:not(.theme-light) #peniel-watermark.is-dark-ink,
html.theme-dark #peniel-watermark.is-dark-ink {
  opacity: 0.42;
  filter: invert(1) hue-rotate(180deg) contrast(1.05);
}

/* Preview de upload: sempre fundo escuro (como no telÃ£o) para ver a arte original */
html.theme-light #midia-igreja-logo-preview {
  background: #141414 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: rgba(255, 255, 255, 0.55) !important;
}

html.theme-light #midia-igreja-logo-preview .text-peniel-muted,
html.theme-light #midia-igreja-logo-preview .text-peniel-muted\/50 {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* =========================================================
   BotÃµes â€” sistema global compacto, hierÃ¡rquico e temÃ¡tico
   GrenÃ¡ identifica a aÃ§Ã£o principal; perigo usa vermelho apenas
   quando a aÃ§Ã£o Ã© destrutiva. SecundÃ¡rios tÃªm superfÃ­cie prÃ³pria.
   ========================================================= */
:root,
html.theme-dark,
html:not(.theme-light) {
  --p-btn-primary-bg: #7f272b;
  --p-btn-primary-hover: #943137;
  --p-btn-primary-border: #a54348;
  --p-btn-primary-shadow: rgba(72, 12, 16, 0.28);
  --p-btn-secondary-bg: #222227;
  --p-btn-secondary-hover: #2b2b31;
  --p-btn-secondary-border: #3d3d45;
  --p-btn-secondary-text: #e8e7e5;
  --p-btn-danger-bg: rgba(185, 28, 28, 0.12);
  --p-btn-danger-hover: rgba(185, 28, 28, 0.22);
  --p-btn-danger-border: rgba(239, 68, 68, 0.48);
  --p-btn-danger-text: #fca5a5;
}

html.theme-light {
  --p-btn-primary-bg: #81292d;
  --p-btn-primary-hover: #962f35;
  --p-btn-primary-border: #7a2429;
  --p-btn-primary-shadow: rgba(91, 20, 24, 0.18);
  --p-btn-secondary-bg: #ffffff;
  --p-btn-secondary-hover: #f3f1ed;
  --p-btn-secondary-border: #a8a49e;
  --p-btn-secondary-text: #1f1e22;
  --p-btn-danger-bg: rgba(185, 28, 28, 0.07);
  --p-btn-danger-hover: rgba(185, 28, 28, 0.13);
  --p-btn-danger-border: rgba(185, 28, 28, 0.42);
  --p-btn-danger-text: #991b1b;
}

.btn-primary,
.btn-outline,
.btn-secondary,
.btn-danger,
.btn-ghost {
  min-height: 2.5rem !important;
  padding: 0.58rem 1rem !important;
  border-radius: 0.7rem !important;
  font-size: 0.875rem !important;
  font-weight: 650 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.005em;
  gap: 0.45rem;
  border-width: 1px !important;
  box-shadow: none !important;
  transform: translateY(0);
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 100ms ease !important;
}

.btn-primary {
  color: #fff !important;
  background: var(--p-btn-primary-bg) !important;
  border-color: var(--p-btn-primary-border) !important;
  box-shadow: 0 2px 8px var(--p-btn-primary-shadow) !important;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: #fff !important;
  background: var(--p-btn-primary-hover) !important;
  border-color: var(--p-btn-primary-hover) !important;
  box-shadow: 0 4px 12px var(--p-btn-primary-shadow) !important;
}

.btn-outline,
.btn-secondary {
  color: var(--p-btn-secondary-text) !important;
  background: var(--p-btn-secondary-bg) !important;
  border-color: var(--p-btn-secondary-border) !important;
}

.btn-outline:hover,
.btn-outline:focus-visible,
.btn-secondary:hover,
.btn-secondary:focus-visible {
  color: var(--p-text) !important;
  background: var(--p-btn-secondary-hover) !important;
  border-color: rgba(var(--p-grena-rgb), 0.48) !important;
  box-shadow: 0 2px 8px var(--p-shadow) !important;
}

.btn-ghost {
  color: var(--p-muted) !important;
  background: transparent !important;
  border-color: transparent !important;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--p-text) !important;
  background: rgba(var(--p-text-rgb), 0.055) !important;
}

.btn-danger,
.btn-outline.text-red-300,
.peniel-dialog__btn-danger {
  color: var(--p-btn-danger-text) !important;
  background: var(--p-btn-danger-bg) !important;
  border-color: var(--p-btn-danger-border) !important;
  box-shadow: none !important;
}

.btn-danger:hover,
.btn-danger:focus-visible,
.btn-outline.text-red-300:hover,
.btn-outline.text-red-300:focus-visible,
.peniel-dialog__btn-danger:hover,
.peniel-dialog__btn-danger:focus-visible {
  color: var(--p-btn-danger-text) !important;
  background: var(--p-btn-danger-hover) !important;
  border-color: rgba(239, 68, 68, 0.7) !important;
}

.btn-lg {
  min-height: 2.875rem !important;
  padding: 0.7rem 1.25rem !important;
  font-size: 0.9375rem !important;
}

.btn-primary:active,
.btn-outline:active,
.btn-secondary:active,
.btn-danger:active,
.btn-ghost:active {
  transform: translateY(1px) !important;
}

.btn-primary:disabled,
.btn-outline:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-ghost:disabled {
  opacity: 0.48 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Modais de escolha: mantÃ©m alvo confortÃ¡vel, reduz o â€œparedÃ£o vermelhoâ€. */
#cultos-modal-edit-scope .space-y-3,
#cultos-modal-excluir .space-y-3 {
  display: grid;
  gap: 0.625rem;
}

#cultos-modal-edit-scope .space-y-3 > *,
#cultos-modal-excluir .space-y-3 > * {
  margin-top: 0 !important;
}

#cultos-edit-scope-cancel,
#cultos-excluir-cancel-rec,
#cultos-excluir-cancel {
  color: var(--p-muted) !important;
  background: transparent !important;
  border-color: transparent !important;
}

#cultos-edit-scope-cancel:hover,
#cultos-excluir-cancel-rec:hover,
#cultos-excluir-cancel:hover {
  color: var(--p-text) !important;
  background: rgba(var(--p-text-rgb), 0.055) !important;
}

#cultos-excluir-sequencia,
#cultos-excluir-confirm {
  color: var(--p-btn-danger-text) !important;
  background: var(--p-btn-danger-bg) !important;
  border-color: var(--p-btn-danger-border) !important;
}

#cultos-excluir-sequencia:hover,
#cultos-excluir-confirm:hover {
  background: var(--p-btn-danger-hover) !important;
  border-color: rgba(239, 68, 68, 0.7) !important;
}

/* â€”â€” CTAs customizados espalhados pelo app â€”â€” */
#biblia-view .btn-primary,
.devocional-read-btn,
.devocional-hero-cta.btn-primary,
.holyrics-go-btn:not(.holyrics-go-btn--outline):not(.is-live),
.peniel-play-btn {
  color: #fff !important;
  background: var(--p-btn-primary-bg) !important;
  background-image: none !important;
  border: 1px solid var(--p-btn-primary-border) !important;
  box-shadow: 0 2px 8px var(--p-btn-primary-shadow) !important;
}

#biblia-view .btn-primary:hover,
#biblia-view .btn-primary:focus-visible,
.devocional-read-btn:hover,
.devocional-read-btn:focus-visible,
.holyrics-go-btn:not(.holyrics-go-btn--outline):not(.is-live):hover,
.peniel-play-btn:hover {
  color: #fff !important;
  background: var(--p-btn-primary-hover) !important;
  background-image: none !important;
  border-color: var(--p-btn-primary-hover) !important;
}

/* "Reler": secundÃ¡rio legÃ­vel â€” sem gradiente vermelho sob texto grenÃ¡ */
.devocional-read-card.is-done .devocional-read-btn {
  color: var(--p-btn-secondary-text) !important;
  background: var(--p-btn-secondary-bg) !important;
  background-image: none !important;
  border: 1px solid var(--p-btn-secondary-border) !important;
  box-shadow: none !important;
}

.devocional-read-card.is-done .devocional-read-btn:hover,
.devocional-read-card.is-done .devocional-read-btn:focus-visible {
  color: var(--p-text) !important;
  background: var(--p-btn-secondary-hover) !important;
  border-color: rgba(var(--p-grena-rgb), 0.48) !important;
}

.devocional-read-btn .devocional-btn-icon,
.devocional-read-btn svg {
  color: inherit !important;
  fill: currentColor !important;
  stroke: currentColor !important;
}

.devocional-modal-next,
.holyrics-go-btn--outline:not(.is-live) {
  color: var(--p-btn-secondary-text) !important;
  background: var(--p-btn-secondary-bg) !important;
  background-image: none !important;
  border: 1px solid var(--p-btn-secondary-border) !important;
  box-shadow: none !important;
}

.devocional-modal-next:hover,
.devocional-modal-next:focus-visible,
.holyrics-go-btn--outline:not(.is-live):hover {
  color: var(--p-text) !important;
  background: var(--p-btn-secondary-hover) !important;
  border-color: rgba(var(--p-grena-rgb), 0.48) !important;
}

.dash-quick-btn {
  min-height: 2.75rem !important;
  color: var(--p-btn-secondary-text) !important;
  background: var(--p-btn-secondary-bg) !important;
  border: 1px solid var(--p-btn-secondary-border) !important;
}

.dash-quick-btn:hover {
  color: var(--p-text) !important;
  background: var(--p-btn-secondary-hover) !important;
  border-color: rgba(var(--p-grena-rgb), 0.48) !important;
}

.louvor-rep-action.btn-outline,
.louvor-rep-action.btn-primary {
  min-height: 2.5rem !important;
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .btn-outline,
  .btn-secondary,
  .btn-danger,
  .btn-ghost,
  .devocional-read-btn,
  .holyrics-go-btn,
  .devocional-modal-next {
    transition: none !important;
  }
}

/* â€”â€” Light mode: reforÃ§o final de controles clicÃ¡veis â€”â€” */
html.theme-light .peniel-chip,
html.theme-light .peniel-chip-link,
html.theme-light .midia-filter-pill,
html.theme-light .banco-tag {
  background: #ffffff !important;
  border-color: #b8b5b0 !important;
  color: #2f2f35 !important;
}

html.theme-light .peniel-chip-link:hover,
html.theme-light .midia-filter-pill:hover,
html.theme-light .midia-filter-pill.is-active {
  border-color: rgba(143, 22, 22, 0.45) !important;
  color: var(--p-grena) !important;
  background: #fff8f8 !important;
}

html.theme-light .biblia-sticky-nav-btn,
html.theme-light .biblia-sticky-ref-btn {
  background: #ffffff !important;
  border-color: #b8b5b0 !important;
  color: #2f2f35 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

html.theme-light .app-header__tools {
  gap: 0.45rem;
}
