/* ==========================================================================
   IA PARA PASTORES — Design System Oficial & Moderno 2026
   Navy Blue Premium, 6 Categorias Ministeriais, Modo Claro & Escuro
   Conformidade total com Web Interface Guidelines (Vercel)
   ========================================================================== */

:root {
  color-scheme: light;
  --navy-950: #070e1e;
  --navy-900: #0b1a36;
  --navy-850: #0f2447;
  --navy-800: #163261;
  --navy-700: #1d4080;
  --navy-600: #2563eb;
  --navy-500: #3b82f6;

  --gold-500: #f59e0b;
  --gold-600: #d97706;
  --gold-400: #fbbf24;
  --emerald-600: #10b981;
  --danger-600: #ef4444;

  /* Tema Claro (Padrão) */
  --bg: #f8fafc;
  --bg-gradient: radial-gradient(at 0% 0%, rgba(219, 234, 254, 0.4) 0px, transparent 50%),
                    radial-gradient(at 100% 100%, rgba(254, 243, 199, 0.3) 0px, transparent 50%);
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --surface-hover: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Sombras Modernas e Suaves */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 20px 32px -6px rgba(15, 23, 42, 0.16);
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.25);

  /* Cores por Categoria (6 Áreas Ministeriais) */
  --cat-1-fg: #1d4ed8; --cat-1-bg: #eff6ff; --cat-1-border: #bfdbfe; --cat-1-solid: #1e40af;
  --cat-2-fg: #15803d; --cat-2-bg: #f0fdf4; --cat-2-border: #bbf7d0; --cat-2-solid: #166534;
  --cat-3-fg: #b45309; --cat-3-bg: #fffbeb; --cat-3-border: #fde68a; --cat-3-solid: #92400e;
  --cat-4-fg: #6d28d9; --cat-4-bg: #faf5ff; --cat-4-border: #e9d5ff; --cat-4-solid: #5b21b6;
  --cat-5-fg: #c2410c; --cat-5-bg: #fff7ed; --cat-5-border: #fed7aa; --cat-5-solid: #9a3412;
  --cat-6-fg: #0e7490; --cat-6-bg: #ecfeff; --cat-6-border: #a5f3fc; --cat-6-solid: #155e75;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070d18;
  --bg-gradient: radial-gradient(at 0% 0%, rgba(30, 58, 138, 0.18) 0px, transparent 50%),
                    radial-gradient(at 100% 100%, rgba(217, 119, 6, 0.12) 0px, transparent 50%);
  --surface: #0f192c;
  --surface-alt: #16243d;
  --surface-hover: #1e3253;
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #223554;
  --border-strong: #324c75;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.65);
  --focus-ring: 0 0 0 3px rgba(96, 165, 250, 0.35);

  --cat-1-fg: #93c5fd; --cat-1-bg: rgba(37, 99, 235, 0.15); --cat-1-border: rgba(147, 197, 253, 0.3); --cat-1-solid: #2563eb;
  --cat-2-fg: #86efac; --cat-2-bg: rgba(22, 101, 52, 0.18); --cat-2-border: rgba(134, 239, 172, 0.3); --cat-2-solid: #16a34a;
  --cat-3-fg: #fcd34d; --cat-3-bg: rgba(180, 83, 9, 0.18);  --cat-3-border: rgba(252, 211, 77, 0.3);  --cat-3-solid: #d97706;
  --cat-4-fg: #c4b5fd; --cat-4-bg: rgba(109, 40, 217, 0.18); --cat-4-border: rgba(196, 181, 253, 0.3); --cat-4-solid: #7c3aed;
  --cat-5-fg: #fdba74; --cat-5-bg: rgba(194, 65, 12, 0.18);  --cat-5-border: rgba(253, 186, 116, 0.3); --cat-5-solid: #ea580c;
  --cat-6-fg: #67e8f9; --cat-6-bg: rgba(14, 116, 144, 0.18); --cat-6-border: rgba(103, 232, 249, 0.3); --cat-6-solid: #0891b2;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  scroll-margin-top: 84px;
  letter-spacing: -0.025em;
  font-weight: 800;
}

button, input, select, textarea, a, [role="button"] {
  font: inherit;
  color: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 999;
  background: var(--gold-500);
  color: #09162e;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  transition: top 0.15s ease;
}

.skip-link:focus-visible {
  top: 14px;
}

/* ==========================================================================
   LAYOUT GERAL DO PORTAL (SIDEBAR + MAIN + MOBILE NAV)
   ========================================================================== */

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Menu Lateral no Computador */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.4px;
  line-height: 1.15;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: #93c5fd;
  font-weight: 600;
  display: block;
}

.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-cta-wrap {
  padding: 16px 18px 8px;
}

.btn-sidebar-create {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #09162e;
  font-weight: 800;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-sidebar-create:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

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

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
}

.nav-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: #94a3b8;
  font-weight: 800;
  padding: 14px 10px 6px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  margin-bottom: 3px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.22);
  color: #ffffff;
  font-weight: 700;
  border-left: 3px solid #fbbf24;
}

.nav-item .nav-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.8rem;
}

.quota-mini {
  margin-bottom: 12px;
}

.quota-mini-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.quota-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.quota-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #fbbf24);
  border-radius: 99px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Área Principal */
.main-area {
  flex: 1;
  margin-left: 280px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar Superior em Vidro Fosco (Glassmorphism) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .topbar {
  background: rgba(15, 25, 44, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 620px;
}

.mobile-menu-btn {
  display: none;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.mobile-menu-btn:hover {
  background: var(--surface-hover);
}

.global-search-wrap {
  position: relative;
  flex: 1;
}

.global-search-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  font-size: 0.9rem;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.global-search-input:focus {
  border-color: var(--navy-600);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.global-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-pill {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  letter-spacing: 0.2px;
}

.mode-pill.demo {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

[data-theme="dark"] .mode-pill.demo {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.35);
}

.mode-pill.live {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.icon-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.icon-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.icon-btn:active {
  transform: scale(0.97);
}

.page-content {
  padding: 30px 32px 100px;
  max-width: 1340px;
  width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   CARTÕES DE MÓDULOS COLORIDOS (INSPIRADOS NAS IMAGENS DE REFERÊNCIA)
   ========================================================================== */

.category-block {
  margin-bottom: 36px;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.category-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-pill-num {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.category-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 18px;
}

.module-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.module-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 255, 0.25);
}

.module-tile:active {
  transform: translateY(-1px);
}

.module-tile-banner {
  padding: 20px 18px 16px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  position: relative;
}

.module-tile-num {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.28);
  padding: 3px 8px;
  border-radius: 99px;
  backdrop-filter: blur(4px);
}

.module-tile-prompts-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  padding: 3px 8px;
  border-radius: 99px;
  backdrop-filter: blur(4px);
}

.module-tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-top: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.module-tile-title {
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.25;
}

.module-tile-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.module-tile-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.module-tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--navy-600);
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

[data-theme="dark"] .module-tile-footer {
  color: #93c5fd;
}

/* Cores específicas de cada categoria nos cartões */
.cat-theme-cat-1 .module-tile-banner, .cat-pill-cat-1 { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.cat-theme-cat-2 .module-tile-banner, .cat-pill-cat-2 { background: linear-gradient(135deg, #166534, #16a34a); }
.cat-theme-cat-3 .module-tile-banner, .cat-pill-cat-3 { background: linear-gradient(135deg, #92400e, #d97706); }
.cat-theme-cat-4 .module-tile-banner, .cat-pill-cat-4 { background: linear-gradient(135deg, #5b21b6, #7c3aed); }
.cat-theme-cat-5 .module-tile-banner, .cat-pill-cat-5 { background: linear-gradient(135deg, #9a3412, #ea580c); }
.cat-theme-cat-6 .module-tile-banner, .cat-pill-cat-6 { background: linear-gradient(135deg, #155e75, #0891b2); }

/* ==========================================================================
   COMPONENTES DO PAINEL E PÁGINAS INTERNAS
   ========================================================================== */

.hero-welcome {
  background: radial-gradient(circle at top right, #1d4080 0%, #0f2447 50%, #070e1e 100%);
  color: #ffffff;
  border-radius: 24px;
  padding: 30px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 4px solid var(--gold-500);
  position: relative;
  overflow: hidden;
}

.hero-welcome h1 {
  font-size: 1.65rem;
  font-weight: 900;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.hero-welcome p {
  color: #dbeafe;
  font-size: 0.95rem;
  max-width: 660px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease, filter 0.15s ease;
  user-select: none;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--navy-600);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--navy-700);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #09162e;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-gold:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-hover);
}

.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

[data-theme="dark"] .btn-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

.btn-sm {
  padding: 6px 13px;
  font-size: 0.8rem;
  border-radius: 9px;
}

/* Destaque Montador + Uso do Plano no Painel */
.dashboard-highlight-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

.builder-promo-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-alt) 100%);
  border-left: 5px solid var(--gold-500);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.list-item-row {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}

.list-item-row:hover {
  border-color: var(--navy-600);
  background-color: var(--surface-hover);
  transform: translateY(-1px);
}

.list-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.list-item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FORMULÁRIOS, EDITOR E REVISÃO TEOLÓGICA
   ========================================================================== */

.workspace-split {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 24px;
  align-items: start;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.form-select option {
  background-color: var(--surface);
  color: var(--text);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--navy-600);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}

.editor-textarea {
  width: 100%;
  min-height: 460px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-family: "Georgia", "Merriweather", serif;
  font-size: 1rem;
  line-height: 1.8;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.editor-textarea:focus {
  border-color: var(--navy-600);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ethical-banner {
  background: var(--cat-1-bg);
  border: 1px solid var(--cat-1-border);
  color: var(--text);
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  line-height: 1.55;
  box-shadow: var(--shadow-xs);
}

.toolbar-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  background: var(--surface-alt);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.review-box {
  margin-top: 22px;
  border: 2px solid var(--gold-500);
  border-radius: 18px;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.review-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.review-section h4 {
  font-size: 0.94rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--navy-600);
}

[data-theme="dark"] .review-section h4 {
  color: #fbbf24;
}

/* ==========================================================================
   LANDING PAGE + QUIZ INTERATIVO
   ========================================================================== */

.landing-wrapper {
  min-height: 100vh;
  background: var(--bg);
  background-image: var(--bg-gradient);
}

.landing-nav {
  background: rgba(11, 26, 54, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  border-bottom: 3px solid var(--gold-500);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.landing-hero {
  background: radial-gradient(circle at top right, #1d4080 0%, #0f2447 65%, #070e1e 100%);
  color: #ffffff;
  padding: 64px 24px 76px;
  text-align: center;
  position: relative;
}

.landing-badge {
  display: inline-block;
  background: rgba(251, 191, 36, 0.18);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.45);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 7px 16px;
  border-radius: 99px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.landing-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  max-width: 900px;
  margin: 0 auto 20px;
  letter-spacing: -0.035em;
}

.landing-hero h1 span {
  color: #fbbf24;
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.35);
}

.landing-hero p {
  font-size: 1.12rem;
  color: #cbd5e1;
  max-width: 700px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

.landing-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.landing-stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 18px 28px;
  border-radius: 16px;
  min-width: 170px;
  backdrop-filter: blur(10px);
}

.landing-stat-num, .nav-badge, .quota-mini-top, .module-tile-num, .module-tile-prompts-badge {
  font-variant-numeric: tabular-nums;
}

.landing-stat-num {
  font-size: 1.9rem;
  font-weight: 900;
  color: #fbbf24;
}

.landing-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.topbar-profile-name {
  display: inline;
}

@media (max-width: 600px) {
  .topbar-profile-name {
    display: none;
  }
}

/* ==========================================================================
   NAVEGAÇÃO INFERIOR E RESPONSIVIDADE MOBILE
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(11, 26, 54, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 90;
  justify-content: space-around;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
}

.mobile-bottom-btn {
  background: none;
  border: 0;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  min-width: 54px;
  min-height: 44px;
  transition: color 0.15s ease;
}

.mobile-bottom-btn.active {
  color: #fbbf24;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 95;
}

.sidebar-nav, .modal-dialog-card {
  overscroll-behavior: contain;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--navy-900);
  color: #fff;
  padding: 14px 20px;
  border-radius: 14px;
  border-left: 4px solid var(--gold-500);
  box-shadow: var(--shadow-xl);
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 400px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop.open {
    display: block;
  }
  .sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .main-area {
    margin-left: 0;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .dashboard-highlight-row,
  .workspace-split {
    grid-template-columns: 1fr;
  }
  .page-content {
    padding: 20px 16px 104px;
  }
  .topbar {
    padding: 10px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Estilo de Impressão / Exportação PDF Nativa */
@media print {
  .sidebar, .topbar, .mobile-bottom-nav, .no-print, .toolbar-wrap {
    display: none !important;
  }
  .main-area {
    margin-left: 0 !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .card {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}
