/* ═══════════════════════════════════════════════════════════════════
   THEOS — Ultra-Modern Platform Components
   Visual: Evangelismo de Rua  |  Glassmorphism + Animated Accents
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Variable bridge (site.css → theos tokens) ─────────────────── */
:root {
  --gold: var(--orange);
  --gold-light: var(--orange-light);
  --gold-dim: var(--orange-dark);
  --gold-glow: rgba(255, 107, 26, 0.15);
  --gold-glow-strong: rgba(255, 107, 26, 0.3);
  --border-gold: rgba(255, 107, 26, 0.25);
  --bg-deep: var(--black);
  --bg-base: var(--black-2);
  --bg-surface: var(--black-3);
  --bg-elevated: var(--black-4);
  --bg-hover: #2a2a2a;
  --bg-active: #333333;
  --glass-bg: var(--glass);
  --glass-shine: rgba(255, 255, 255, 0.03);
  --text-primary: var(--white);
  --text-secondary: var(--gray-200);
  --text-muted: var(--gray-400);
  --text-inverse: var(--white);
  --border: var(--glass-border);
  --border-subtle: rgba(255, 255, 255, 0.03);
  --accent: var(--orange);
  --accent-light: var(--orange-light);
  --success: #34d399;
  --success-dim: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --danger-dim: rgba(248, 113, 113, 0.12);
  --warning: #fbbf24;
  --warning-dim: rgba(251, 191, 36, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: var(--shadow-orange);
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.3s;
  --duration-slow: 0.5s;

  --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ─── Keyframes ─────────────────────────────────────────────────── */
@keyframes borderRotate {
  to { --border-angle: 360deg; }
}

@keyframes shimmerSweep {
  0%   { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(300%) skewX(-15deg); }
}

@keyframes msgSlide {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%           { transform: translateY(-6px); opacity: 1; }
}

@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.25); }
  50%      { box-shadow: 0 0 8px 2px rgba(52, 211, 153, 0.15); }
}

@keyframes seloShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes meshFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -20px) scale(1.05); }
  66%      { transform: translate(-20px, 15px) scale(0.97); }
}

@keyframes meshFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-25px, 15px) scale(1.04); }
  66%      { transform: translate(15px, -25px) scale(0.96); }
}

@keyframes crossFloat {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); opacity: 0.03; }
  50%      { transform: translate(-50%, -50%) rotate(8deg); opacity: 0.06; }
}

@keyframes gradientTopBorder {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes inputGlow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 107, 26, 0.1); }
  50%      { box-shadow: 0 0 0 4px rgba(255, 107, 26, 0.2), 0 0 16px rgba(255, 107, 26, 0.08); }
}

/* ─── Custom scrollbar (orange accent) ──────────────────────────── */
body.theos-app ::-webkit-scrollbar { width: 6px; height: 6px; }
body.theos-app ::-webkit-scrollbar-track { background: rgba(10, 10, 10, 0.5); }
body.theos-app ::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 26, 0.35);
  border-radius: 999px;
}
body.theos-app ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 26, 0.55);
}

/* ═══════════════════════════════════════════════════════════════════
   BODY / LAYOUT
   ═══════════════════════════════════════════════════════════════════ */
body.theos-app {
  padding-top: 0;
}

body.theos-app main.theos-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 100px 24px 3rem;
  min-height: calc(100vh - 200px);
}

/* Modo "limpo" (devocional para compartilhar): sem header fixo, sem vão no topo. */
body.theos-app.theos-limpo main.theos-main { padding-top: 2.5rem; }

body.theos-app .nav-link.ativo-theos {
  color: var(--white);
  background: rgba(255, 107, 26, 0.2);
}

body.theos-app .nav-user {
  font-size: 0.82rem;
  color: var(--gray-400);
  padding: 8px 12px;
  white-space: nowrap;
}

body.theos-app .nav-user small {
  opacity: 0.7;
}

body.theos-app .nav-sair {
  color: var(--gray-400) !important;
}

body.theos-app .nav-sair:hover {
  color: var(--orange) !important;
}

.sub a {
  color: var(--orange);
  font-weight: 600;
  transition: var(--transition);
}

.sub a:hover {
  color: var(--orange-light);
  text-shadow: 0 0 12px rgba(255, 107, 26, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════
   CARTAO — Glassmorphism with animated gradient border
   ═══════════════════════════════════════════════════════════════════ */
.cartao {
  background:
    var(--noise),
    linear-gradient(135deg, rgba(26, 26, 26, 0.85), rgba(34, 34, 34, 0.75));
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow:
    var(--shadow-md),
    var(--shadow-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
  transition: all var(--duration-slow) var(--ease-out);
}

.cartao::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent, var(--orange-dark), var(--orange), var(--orange-light), var(--orange-dark), transparent);
  background-size: 200% 100%;
  animation: gradientTopBorder 4s linear infinite;
}

.cartao::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 107, 26, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.cartao:hover {
  border-color: rgba(255, 107, 26, 0.25);
  box-shadow:
    var(--shadow-lg),
    0 0 40px rgba(255, 107, 26, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.cartao h2 {
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-title);
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS — Shimmer sweep + glow
   ═══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--orange-dark) 0%, var(--orange) 50%, var(--orange-light) 100%);
  background-size: 200% 200%;
  color: var(--white);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.35s var(--ease-out);
  box-shadow: var(--shadow-orange);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-15deg);
  transition: none;
  z-index: 2;
}

.btn:hover {
  background-position: 100% 100%;
  transform: translateY(-2px);
  color: var(--white);
  box-shadow:
    0 8px 32px rgba(255, 107, 26, 0.4),
    0 0 16px rgba(255, 107, 26, 0.2);
}

.btn:hover::before {
  animation: shimmerSweep 0.7s ease forwards;
}

.btn:active { transform: translateY(0); }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn:disabled:hover::before {
  animation: none;
}

.btn.grande {
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  margin-top: 0.75rem;
}

/* Secondary button */
.btn-sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--orange);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.35s var(--ease-out);
  position: relative;
}

.btn-sec:hover {
  border-color: var(--orange);
  color: var(--orange-light);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 107, 26, 0.12), 0 4px 12px rgba(0, 0, 0, 0.2);
  background: rgba(255, 107, 26, 0.06);
}

.btn-sec:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   FORMS — Animated focus glow
   ═══════════════════════════════════════════════════════════════════ */
.painel-estreito { max-width: 460px; margin: 2.5rem auto; }

.formulario {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1rem;
}

.formulario label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--gray-400);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.formulario .dois {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.formulario .dois label { min-width: 0; }

.formulario input,
.formulario select,
.formulario textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--black);
  color: var(--white);
  transition: all 0.35s var(--ease-out);
  outline: none;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.formulario input::placeholder,
.formulario textarea::placeholder {
  color: var(--gray-600);
  transition: color var(--duration) var(--ease-out);
}

.formulario input:focus,
.formulario select:focus,
.formulario textarea:focus {
  border-color: var(--orange);
  animation: inputGlow 2s ease-in-out infinite;
  background: rgba(17, 17, 17, 0.95);
  transform: translateY(-1px);
}

.formulario input:focus::placeholder,
.formulario textarea:focus::placeholder {
  color: var(--gray-400);
}

.formulario textarea {
  resize: vertical;
  min-height: 80px;
}

.formulario select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239E9E9E' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}

.formulario label.checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
  text-transform: none;
  color: var(--gray-200);
  font-size: 0.88rem;
  cursor: pointer;
}

.formulario label.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 0.15rem;
  accent-color: var(--orange);
  cursor: pointer;
}

.sub {
  color: var(--gray-400);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════════ */
.alerta {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin: 0.6rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.alerta::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.alerta.erro {
  background: var(--danger-dim);
  border-color: rgba(248, 113, 113, 0.2);
  color: #fca5a5;
}
.alerta.erro::before { background: var(--danger); }

.alerta.aviso {
  background: var(--warning-dim);
  border-color: rgba(251, 191, 36, 0.2);
  color: #fde68a;
}
.alerta.aviso::before { background: var(--warning); }

.alerta.ok {
  background: var(--success-dim);
  border-color: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
}
.alerta.ok::before { background: var(--success); }

/* ═══════════════════════════════════════════════════════════════════
   CODE
   ═══════════════════════════════════════════════════════════════════ */
code, .mono {
  font-family: 'JetBrains Mono', Consolas, monospace;
  background: var(--black);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.82em;
  color: var(--orange-light);
  border: 1px solid var(--glass-border);
}

/* ═══════════════════════════════════════════════════════════════════
   PANEL GRID
   ═══════════════════════════════════════════════════════════════════ */
.grade-painel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 800px) {
  .grade-painel { grid-template-columns: 1fr; }
}

.titulo-lista {
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-title);
}

/* ═══════════════════════════════════════════════════════════════════
   STUDY LIST
   ═══════════════════════════════════════════════════════════════════ */
.lista-estudos {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lista-estudos a {
  display: block;
  background: var(--black-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  text-decoration: none;
  color: var(--white);
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.lista-estudos a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--orange), var(--orange-light));
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}

.lista-estudos a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 26, 0.03) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}

.lista-estudos a:hover {
  background: var(--black-4);
  border-color: rgba(255, 107, 26, 0.3);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.lista-estudos a:hover::before { opacity: 1; }
.lista-estudos a:hover::after { opacity: 1; }

.lista-estudos .meta {
  display: block;
  color: var(--gray-400);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.vazio {
  color: var(--gray-400);
  font-style: italic;
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════════
   STUDY / CHAT
   ═══════════════════════════════════════════════════════════════════ */
.estudo {
  display: flex;
  flex-direction: column;
  min-height: 75vh;
}

.estudo-cabecalho {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.estudo-cabecalho .voltar {
  white-space: nowrap;
  padding-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--gray-400);
  transition: all var(--duration) var(--ease-out);
}

.estudo-cabecalho .voltar:hover {
  color: var(--orange);
  transform: translateX(-2px);
}

.estudo-cabecalho h2 {
  color: var(--white);
  font-weight: 700;
  font-size: 1.4rem;
  font-family: var(--font-title);
}

.estudo-cabecalho .meta {
  color: var(--gray-400);
  font-size: 0.85rem;
}

/* Chat container — with top fade */
.conversa {
  flex: 1;
  overflow-y: auto;
  max-height: 62vh;
  padding: 1.25rem;
  background:
    linear-gradient(180deg, var(--black-3) 0%, rgba(26, 26, 26, 0.95) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
  position: relative;
}

.conversa::before {
  content: '';
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  min-height: 24px;
  margin: -1.25rem -1.25rem 0;
  background: linear-gradient(180deg, var(--black-3) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
  flex-shrink: 0;
}

.vazio-conversa {
  text-align: center;
  color: var(--gray-400);
  margin: auto;
  padding: 2rem;
}

.vazio-conversa p:first-child {
  font-size: 1.1rem;
  color: var(--gray-200);
}

/* Messages */
.mensagem {
  max-width: 88%;
  animation: msgSlide 0.4s var(--ease-spring);
}

/* User message */
.mensagem.usuario {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--orange-dark) 0%, var(--orange) 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);
  padding: 0.8rem 1.1rem;
  color: #fff;
  font-size: 0.93rem;
  box-shadow:
    0 4px 16px rgba(255, 107, 26, 0.25),
    0 0 32px rgba(255, 107, 26, 0.08);
}

/* THEOS response */
.mensagem.theos {
  align-self: flex-start;
  background:
    linear-gradient(135deg, rgba(34, 34, 34, 0.95) 0%, rgba(26, 26, 26, 0.98) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 4px var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding: 1rem 1.25rem;
  width: 88%;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.mensagem.theos::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--orange), var(--orange-light), var(--orange-dark));
  border-radius: 3px 0 0 3px;
}

.mensagem.theos .autor {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mensagem .conteudo h1,
.mensagem .conteudo h2,
.mensagem .conteudo h3,
.mensagem .conteudo h4 {
  color: var(--orange-light);
  margin: 0.9rem 0 0.4rem;
  line-height: 1.35;
}

.mensagem .conteudo p { margin: 0.45rem 0; line-height: 1.65; color: var(--white); }
.mensagem .conteudo ul { margin: 0.4rem 0 0.4rem 1.2rem; }
.mensagem .conteudo li { margin: 0.25rem 0; color: var(--white); }
.mensagem .conteudo code {
  background: var(--black);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Thinking indicator — 3 bouncing dots */
.pensando {
  color: var(--orange);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pensando::after {
  content: '';
  display: inline-flex;
  width: 32px;
  height: 10px;
  background:
    radial-gradient(circle 3px at 4px 5px,  var(--orange) 98%, transparent),
    radial-gradient(circle 3px at 16px 5px, var(--orange) 98%, transparent),
    radial-gradient(circle 3px at 28px 5px, var(--orange) 98%, transparent);
  background-repeat: no-repeat;
  animation: dotBounce 1.4s ease-in-out infinite;
}

/* Chat input */
.form-msg {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  align-items: flex-end;
}

.form-msg textarea {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.93rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  resize: vertical;
  background: var(--black-3);
  color: var(--white);
  outline: none;
  min-height: 48px;
  transition: all 0.35s var(--ease-out);
}

.form-msg textarea:focus {
  border-color: rgba(255, 107, 26, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 107, 26, 0.12), 0 0 20px rgba(255, 107, 26, 0.05);
  background: rgba(17, 17, 17, 0.95);
}

.form-msg .btn {
  height: fit-content;
  padding: 0.8rem 1.6rem;
}

/* ═══════════════════════════════════════════════════════════════════
   STUDY ACTIONS
   ═══════════════════════════════════════════════════════════════════ */
.estudo-acoes {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.link-esbocos {
  font-size: 0.85rem;
  color: var(--gray-200);
  font-weight: 500;
}

.esboco-status {
  color: var(--gray-400);
  font-style: italic;
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════════
   PAGE HEADERS
   ═══════════════════════════════════════════════════════════════════ */
.cabecalho-pagina { margin-bottom: 1.5rem; }

.cabecalho-pagina h2 {
  color: var(--white);
  font-weight: 700;
  font-size: 1.6rem;
  font-family: var(--font-title);
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════════════
   SERMON / GUIDE SHEETS
   ═══════════════════════════════════════════════════════════════════ */
.item-esboco { display: flex; align-items: stretch; gap: 0.5rem; }
.item-esboco > a { flex: 1; }
.form-excluir { display: flex; }

.link-excluir {
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--gray-400);
  cursor: pointer;
  padding: 0 0.8rem;
  font-size: 1rem;
  transition: all 0.35s var(--ease-out);
}

.link-excluir:hover {
  background: var(--danger-dim);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--danger);
  transform: scale(1.05);
}

.esboco-acoes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.esboco-acoes > div { display: flex; gap: 0.6rem; align-items: center; }

.esboco-acoes .voltar {
  font-size: 0.9rem;
  color: var(--gray-400);
  transition: all var(--duration) var(--ease-out);
}

.esboco-acoes .voltar:hover {
  color: var(--orange);
  transform: translateX(-2px);
}

/* Sermon/Guide sheet — with vignette */
.folha-esboco {
  background:
    var(--noise),
    linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(34, 34, 34, 0.8));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 820px;
  margin: 0 auto;
  box-shadow:
    var(--shadow-lg),
    inset 0 0 100px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.folha-esboco::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
}

.esboco-topo {
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  position: relative;
}

.esboco-topo::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
}

.esboco-topo h1 {
  color: var(--white);
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-title);
  line-height: 1.25;
  position: relative;
  z-index: 1;
}

.esboco-topo .texto-base {
  color: var(--orange);
  font-weight: 600;
  margin-top: 0.6rem;
  position: relative;
  z-index: 1;
}

.esboco-secao {
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 1;
}

.esboco-secao h2 {
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.esboco-secao h2::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 1px;
  background: var(--orange);
}

.esboco-secao .conteudo p {
  margin: 0.45rem 0;
  line-height: 1.7;
  color: var(--white);
}

.esboco-secao .conteudo p.num {
  font-weight: 700;
  color: var(--white);
  margin-top: 0.8rem;
}

.esboco-secao .conteudo ul { margin: 0.5rem 0 0.5rem 1.4rem; }
.esboco-secao .conteudo li { margin: 0.3rem 0; color: var(--white); line-height: 1.6; }
.esboco-secao .conteudo strong { color: var(--orange-light); }

.esboco-rodape {
  text-align: center;
  color: var(--gray-400);
  font-size: 0.78rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--glass-border);
  padding-top: 1rem;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════
   SELO — Shimmer badge
   ═══════════════════════════════════════════════════════════════════ */
.selo {
  display: inline-block;
  background:
    linear-gradient(90deg,
      var(--orange-dark) 0%,
      var(--orange) 25%,
      var(--orange-light) 50%,
      var(--orange) 75%,
      var(--orange-dark) 100%);
  background-size: 300% 100%;
  animation: seloShimmer 3s linear infinite;
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 8px rgba(255, 107, 26, 0.2);
}

.tema-guia {
  font-style: italic;
  color: var(--gray-200);
  margin-top: 0.4rem;
}

/* Devotional card preview (social image) */
.devocional-card-preview {
  display: flex;
  justify-content: center;
  margin: 0 0 2rem;
  position: relative;
  z-index: 1;
}

.devocional-card-preview img {
  max-width: min(540px, 100%);
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 26, 0.2);
  box-shadow:
    var(--shadow-lg),
    0 0 48px rgba(255, 107, 26, 0.12),
    0 0 96px rgba(255, 107, 26, 0.06);
  transition: transform var(--duration-slow) var(--ease-out), box-shadow var(--duration-slow) var(--ease-out);
}

.devocional-card-preview img:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    var(--shadow-lg),
    0 0 56px rgba(255, 107, 26, 0.18),
    0 0 120px rgba(255, 107, 26, 0.08);
}

/* Devotional verse */
.folha-esboco.devocional .versiculo {
  border-left: 3px solid var(--orange);
  background: rgba(255, 107, 26, 0.06);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-style: italic;
  color: var(--white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.65;
  position: relative;
  z-index: 1;
  box-shadow: inset 4px 0 16px -4px rgba(255, 107, 26, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════
   PUBLIC LINK
   ═══════════════════════════════════════════════════════════════════ */
.link-publico {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: var(--black-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
}

.link-publico .rotulo {
  font-weight: 600;
  color: var(--orange);
  font-size: 0.9rem;
}

.link-publico input {
  flex: 1;
  min-width: 220px;
  font-family: monospace;
  font-size: 0.8rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--black);
  color: var(--gray-200);
  outline: none;
}

/* Public page */
.banner-publico {
  background:
    linear-gradient(135deg, rgba(255, 107, 26, 0.05) 0%, rgba(255, 107, 26, 0.1) 100%);
  color: var(--white);
  text-align: center;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 107, 26, 0.2);
  font-size: 0.9rem;
  box-shadow: 0 0 24px rgba(255, 107, 26, 0.05);
}

.conversa-publica { max-height: none; }

.cta-publico {
  text-align: center;
  background:
    var(--noise),
    var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

.cta-publico::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
}

.cta-publico p {
  color: var(--gray-200);
  margin-bottom: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════
   ADMIN — Sub-navigation (pill tabs with glow)
   ═══════════════════════════════════════════════════════════════════ */
.admin-subnav {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  padding: 0.35rem;
  background: var(--black-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  width: fit-content;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.admin-subnav a {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.1rem;
  text-decoration: none;
  color: var(--gray-200);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.35s var(--ease-out);
  position: relative;
}

.admin-subnav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

.admin-subnav a.ativo {
  background: linear-gradient(135deg, var(--orange-dark), var(--orange));
  color: var(--white);
  box-shadow: 0 2px 12px rgba(255, 107, 26, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════
   ADMIN — Dashboard Stats (animated top, hover glow)
   ═══════════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 0.75rem;
}

@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--black-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 0.75rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  background-size: 200% 100%;
  animation: gradientTopBorder 3s linear infinite;
}

.stat-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.02);
}

.stat-card .num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  font-family: var(--font-title);
  transition: color var(--duration) var(--ease-out);
}

.stat-card .rot {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 0.45rem;
}

.stat-card.ok::before,
.stat-card.stat-ok::before {
  background: linear-gradient(90deg, transparent, var(--success), rgba(52, 211, 153, 0.3), transparent);
  background-size: 200% 100%;
}
.stat-card.ok .num,
.stat-card.stat-ok .num { color: var(--success); }
.stat-card.ok:hover,
.stat-card.stat-ok:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 24px rgba(52, 211, 153, 0.08);
}

.stat-card.erro::before,
.stat-card.stat-erro::before {
  background: linear-gradient(90deg, transparent, var(--danger), rgba(248, 113, 113, 0.3), transparent);
  background-size: 200% 100%;
}
.stat-card.erro .num,
.stat-card.stat-erro .num { color: var(--danger); }
.stat-card.erro:hover,
.stat-card.stat-erro:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 24px rgba(248, 113, 113, 0.08);
}

/* ═══════════════════════════════════════════════════════════════════
   TABLES — Alternating rows + gradient header
   ═══════════════════════════════════════════════════════════════════ */
table.grade {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.6rem;
}

table.grade thead {
  position: relative;
}

table.grade thead::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 26, 0.3), transparent);
}

table.grade th,
table.grade td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

table.grade th {
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: none;
  padding-bottom: 0.8rem;
}

table.grade td {
  color: var(--white);
  font-size: 0.9rem;
}

table.grade tbody tr {
  transition: background var(--duration) var(--ease-out);
}

table.grade tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

table.grade tbody tr:hover td {
  background: rgba(255, 107, 26, 0.04);
}

table.grade tbody tr:last-child td {
  border-bottom: none;
}

/* ═══════════════════════════════════════════════════════════════════
   BADGES — Pulse + glow
   ═══════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  transition: box-shadow var(--duration) var(--ease-out);
}

.badge-ok {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.15);
  animation: subtlePulse 3s ease-in-out infinite;
}
.badge-ok:hover {
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.2);
}

.badge-rascunho {
  background: var(--warning-dim);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.15);
}
.badge-rascunho:hover {
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
}

.badge-erro {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.15);
}
.badge-erro:hover {
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════
   MISC
   ═══════════════════════════════════════════════════════════════════ */
.status { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0; }
.bolinha {
  width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto;
  box-shadow: 0 0 6px currentColor;
}
.ok { background: var(--success); color: var(--success); }
.erro { background: var(--danger); color: var(--danger); }

hr.sep {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 1.5rem 0;
  position: relative;
}

hr.sep::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 30%;
  right: 30%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 26, 0.15), transparent);
}

.sub-titulo {
  color: var(--white);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════════ */
@media print {
  #header, .footer, .no-print, .esboco-acoes, .back-to-top { display: none !important; }
  body { background: #fff; color: #000; }
  body::before, body::after { display: none; }
  main { padding: 0; max-width: none; }
  .folha-esboco { border: none; box-shadow: none; padding: 0; background: #fff; backdrop-filter: none; }
  .folha-esboco::after { display: none; }
  .cartao { background: #fff; border: 1px solid #ddd; box-shadow: none; backdrop-filter: none; }
  .cartao::before, .cartao::after { display: none; }
  .mensagem.usuario { background: #f0f0f0; color: #000; box-shadow: none; }
  .mensagem.theos { background: #fff; border-color: #ccc; box-shadow: none; }
  .mensagem.theos .autor { color: #333; -webkit-text-fill-color: #333; }
  .conversa { background: #fff; border-color: #ccc; }
  .conversa::before { display: none; }
  .selo { background: #333; animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   AUTH PAGES — Dramatic mesh background + floating cross
   ═══════════════════════════════════════════════════════════════════ */
body.theos-auth {
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
}

body.theos-auth::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 20% 20%, rgba(255, 107, 26, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 60% 60% at 80% 80%, rgba(255, 107, 26, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 140, 74, 0.03) 0%, transparent 50%);
  animation: meshFloat 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

body.theos-auth::after {
  content: '✝';
  position: fixed;
  top: 50%;
  left: 50%;
  font-size: 28rem;
  color: var(--orange);
  opacity: 0.02;
  pointer-events: none;
  z-index: 0;
  font-family: serif;
  line-height: 1;
  animation: crossFloat 15s ease-in-out infinite;
}

body.theos-auth #header.theos-auth-header {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  z-index: 10;
}

body.theos-auth .navbar-auth {
  position: relative;
  justify-content: flex-start;
  min-height: 56px;
  padding-top: 14px;
  padding-bottom: 14px;
}

body.theos-auth .theos-auth-voltar {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray-400);
  transition: all 0.35s var(--ease-out);
}

body.theos-auth .theos-auth-voltar:hover {
  color: var(--orange);
  transform: translateY(-50%) translateX(-3px);
}

body.theos-auth .theos-auth-voltar i {
  margin-right: 6px;
  transition: transform var(--duration) var(--ease-out);
}

body.theos-auth .theos-auth-voltar:hover i {
  transform: translateX(-2px);
}

body.theos-auth main.theos-auth-main {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 88px 24px 3rem;
  position: relative;
  z-index: 1;
}

body.theos-auth .painel-estreito {
  width: 100%;
  margin: 0;
  padding-bottom: 1rem;
}

body.theos-auth .cartao {
  overflow: visible;
  box-shadow:
    var(--shadow-lg),
    0 0 60px rgba(255, 107, 26, 0.06),
    0 0 120px rgba(255, 107, 26, 0.03);
}

body.theos-auth .cartao .formulario,
body.theos-auth .cartao .sub,
body.theos-auth .cartao .alerta,
body.theos-auth .cartao .btn {
  position: relative;
  z-index: 2;
}

.footer-auth-minimal {
  text-align: center;
  padding: 1.5rem;
  color: var(--gray-600);
  font-size: 0.82rem;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  body.theos-auth .theos-auth-voltar {
    left: 16px;
    font-size: 0.8rem;
  }

  body.theos-auth main.theos-auth-main {
    padding: 80px 16px 2.5rem;
  }

  body.theos-auth::after {
    font-size: 16rem;
  }
}

@media (max-width: 768px) {
  body.theos-app main.theos-main { padding: 88px 16px 2rem; }
  .cartao { padding: 1.25rem; }
  .conversa { max-height: 55vh; }
  .folha-esboco { padding: 1.5rem; }
  .formulario .dois { grid-template-columns: 1fr; }
  .admin-subnav { width: 100%; }
  .admin-subnav a { flex: 1; text-align: center; }
  .stats-grid { gap: 0.6rem; }
  .stat-card { padding: 1rem 0.5rem; }
  .stat-card .num { font-size: 1.8rem; }

  .esboco-acoes { flex-direction: column; align-items: stretch; }
  .esboco-acoes > div { justify-content: center; }
}
