/* ===== Variables ===== */
:root {
  --primary: #5d0606;
  --primary-dark: #450404;
  --primary-light: #f5e6e6;
  --dark: #2a0303;
  --accent-gold: #d4a853;
  --accent-green: #25D366;
  --accent-green-dark: #1da851;
  --cream: #f9f5f0;
  --white: #fff;
  --gray: #727586;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: 20px;
}

/* ===== Back Button ===== */
.back-home {
  position: fixed;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  z-index: 50;
  transition: color 0.3s;
}

.back-home svg {
  width: 20px;
  height: 20px;
}

.back-home:hover {
  color: var(--primary-dark);
}

/* ===== Auth Container ===== */
.auth-container {
  width: 100%;
  max-width: 900px;
  min-height: 560px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(93, 6, 6, 0.12);
  display: flex;
  position: relative;
  overflow: hidden;
}

/* ===== Panels ===== */
.auth-panel {
  width: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.6s cubic-bezier(0.68, -0.15, 0.27, 1.15);
}

.panel-left { z-index: 2; }
.panel-right { z-index: 1; }

/* ===== Form Content ===== */
.panel-form {
  width: 100%;
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.4s, transform 0.4s;
}

.auth-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin-bottom: 16px;
  object-fit: cover;
}

.panel-form h2 {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--dark);
  margin-bottom: 4px;
}

.auth-subtitle {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* ===== Overlay (colored side) ===== */
.panel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  color: var(--white);
  z-index: 10;
  transition: opacity 0.4s, transform 0.4s;
}

.panel-overlay h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.panel-overlay p {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 280px;
}

/* Initial state */
.panel-left .panel-overlay {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-20px);
}

.panel-right .panel-overlay {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.panel-right .panel-form {
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
}

/* Active (Register) State */
.auth-container.register-active .panel-left .panel-overlay {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.auth-container.register-active .panel-left .panel-form {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-20px);
}

.auth-container.register-active .panel-right .panel-overlay {
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
}

.auth-container.register-active .panel-right .panel-form {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

/* ===== Auth Error ===== */
.auth-error {
  color: #d32f2f;
  font-size: 0.82rem;
  text-align: center;
  margin-top: 12px;
  min-height: 20px;
}

/* ===== Switch Button ===== */
.btn-switch {
  padding: 12px 40px;
  border-radius: 50px;
  border: 2px solid var(--white);
  background: transparent;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-body);
}

.btn-switch:hover {
  background: var(--white);
  color: var(--primary);
}

/* ===== Form Inputs ===== */
form { width: 100%; }

.input-group {
  margin-bottom: 16px;
  width: 100%;
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--dark);
  transition: border-color 0.3s, box-shadow 0.3s;
  background: var(--cream);
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(93, 6, 6, 0.1);
}

.input-group input::placeholder { color: #b0b0b0; }

.forgot-link {
  display: block;
  text-align: right;
  font-size: 0.82rem;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 20px;
  font-weight: 500;
  transition: color 0.3s;
}

.forgot-link:hover { color: var(--primary-dark); }

/* ===== Auth Button ===== */
.btn-auth {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.3s;
}

.btn-auth:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(93, 6, 6, 0.3);
}

/* ===== Divider ===== */
.divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8e8e8;
}

.divider span {
  font-size: 0.8rem;
  color: var(--gray);
  white-space: nowrap;
}

/* ===== Social Buttons ===== */
.social-auth {
  display: flex;
  gap: 12px;
  width: 100%;
}

.btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--dark);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.3s;
}

.btn-social:hover {
  border-color: #ccc;
  background: #fafafa;
  transform: translateY(-1px);
}

/* ============================================================
   DASHBOARD - MODERN LAYOUT
   ============================================================ */

.dashboard {
  display: none;
  width: 100%;
  min-height: 100vh;
  background: #f4f0eb;
}

.dashboard.active { display: block; }

/* ===== Dashboard Header ===== */
.dashboard-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(42, 3, 3, 0.3);
}

.dashboard-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-nav .dash-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.dashboard-nav .dash-logo img {
  height: 44px;
  width: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
}

.dashboard-nav .dash-logo span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.dash-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
}

.dash-user-name {
  font-size: 0.85rem;
  opacity: 0.9;
}

.btn-logout {
  padding: 7px 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 50px;
  background: transparent;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.3s;
}

.btn-logout:hover {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

/* ===== Dashboard Body ===== */
.dashboard-body {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 68px);
}

/* ===== Sidebar ===== */
.dash-sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--white);
  border-right: 1px solid rgba(0,0,0,0.06);
  padding: 28px 0;
  box-shadow: 2px 0 12px rgba(0,0,0,0.03);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 14px;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--gray);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.25s ease;
  text-align: left;
  position: relative;
}

.sidebar-btn svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
}

.sidebar-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateX(4px);
}

.sidebar-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(93, 6, 6, 0.3);
}

/* ===== Main Content ===== */
.dash-main {
  flex: 1;
  padding: 32px 36px;
  overflow-y: auto;
}

/* ===== Welcome Banner ===== */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #7a1010 50%, var(--primary-dark) 100%);
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 32px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(93, 6, 6, 0.25);
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: 10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
}

.welcome-banner h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.welcome-banner p {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

/* ===== Tabs ===== */
.tab-content { display: none; }
.tab-content.active {
  display: block;
  animation: fadeInTab 0.4s ease;
}

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

.section-label {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

/* ============================================================
   RITUAIS E PRÁTICAS
   ============================================================ */
.rituais-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.ritual-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}

.ritual-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.1);
}

.ritual-thumb {
  position: relative;
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--dark);
  cursor: pointer;
}

.ritual-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
}

.ritual-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: all 0.3s;
  z-index: 2;
}

.ritual-play-btn:hover {
  background: rgba(255,255,255,0.35);
  transform: translate(-50%, -50%) scale(1.1);
}

.ritual-play-btn svg {
  width: 26px;
  height: 26px;
  color: var(--white);
  margin-left: 3px;
}

.ritual-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: var(--white);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

.ritual-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.ritual-info {
  padding: 18px 20px;
}

.ritual-info h4 {
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: 6px;
  font-weight: 700;
}

.ritual-info p {
  font-size: 0.83rem;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-assistir {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: 50px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.3s;
}

.btn-assistir:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(93, 6, 6, 0.3);
}

.btn-assistir svg {
  width: 16px;
  height: 16px;
}

/* ===== Video Player Modal ===== */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.video-modal {
  background: #111;
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
  color: var(--white);
}

.video-modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  flex: 1;
}

.video-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.video-modal-close:hover {
  background: rgba(255,255,255,0.3);
}

.video-modal-player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}

.video-modal-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ============================================================
   CURSOS - Modern Cards
   ============================================================ */
.cursos-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.curso-dash-card {
  background: var(--white);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.curso-dash-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.1);
}

.curso-card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
  padding: 28px 24px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.curso-card-header::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.curso-card-header .curso-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  backdrop-filter: blur(4px);
}

.curso-card-header .curso-icon svg {
  width: 24px;
  height: 24px;
  color: var(--white);
}

.curso-card-header h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.curso-card-header p {
  font-size: 0.85rem;
  opacity: 0.85;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.curso-card-body {
  padding: 20px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.curso-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
}

.curso-tag svg {
  width: 14px;
  height: 14px;
}

.btn-whatsapp-curso {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 50px;
  background: var(--accent-green);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.3s;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp-curso:hover {
  background: var(--accent-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

.btn-whatsapp-curso svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   LIVROS - Modern Cards with Preview
   ============================================================ */
.livros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.livro-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.livro-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.1);
}

.livro-card.locked { opacity: 0.65; }

.livro-cover {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--primary) 0%, #7a1010 50%, var(--dark) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.livro-cover::before {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.livro-cover svg {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.livro-cover-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  text-align: center;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.livro-cover-author {
  font-size: 0.78rem;
  opacity: 0.7;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.livro-body {
  padding: 18px 20px;
}

.livro-body h4 {
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: 4px;
  font-weight: 700;
}

.livro-body .livro-autor {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 8px;
}

.livro-body .livro-desc {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.livro-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-preview-livro {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 2px solid var(--primary);
  border-radius: 12px;
  background: transparent;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.3s;
}

.btn-preview-livro:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-preview-livro svg {
  width: 16px;
  height: 16px;
}

.btn-download-livro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.3s;
  text-decoration: none;
}

.btn-download-livro:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(93, 6, 6, 0.3);
}

.btn-download-livro svg {
  width: 16px;
  height: 16px;
}

.btn-whatsapp-livro {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: var(--accent-green);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.3s;
}

.btn-whatsapp-livro:hover {
  background: var(--accent-green-dark);
}

/* ===== Livro Preview Modal ===== */
.livro-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.livro-modal {
  background: var(--white);
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.livro-modal-cover {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, #7a1010 50%, var(--dark) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  position: relative;
}

.livro-modal-cover svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.livro-modal-cover h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  text-align: center;
  padding: 0 24px;
}

.livro-modal-cover span {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: 4px;
}

.livro-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  backdrop-filter: blur(4px);
}

.livro-modal-close:hover {
  background: rgba(255,255,255,0.3);
}

.livro-modal-body {
  padding: 28px 28px 24px;
}

.livro-modal-body .livro-modal-desc {
  font-size: 0.92rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 24px;
}

.livro-modal-body .livro-modal-actions {
  display: flex;
  gap: 12px;
}

.livro-modal-body .livro-modal-actions .btn-download-livro {
  flex: 1;
  justify-content: center;
  padding: 14px 20px;
  font-size: 0.9rem;
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-free {
  background: #e6f9f0;
  color: #00875a;
}

.badge-code {
  background: #fff3e0;
  color: #e65100;
}

.badge-paid {
  background: var(--primary-light);
  color: var(--primary);
}

/* ===== Empty State ===== */
.empty-state {
  background: var(--white);
  border-radius: 20px;
  padding: 60px 32px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: #ccc;
  margin-bottom: 16px;
}

.empty-state p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* ============================================================
   PROFILE MODAL
   ============================================================ */

.dash-avatar-wrapper {
  position: relative;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.3s;
}

.dash-avatar-wrapper:hover {
  transform: scale(1.1);
}

.avatar-edit-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary-dark);
}

.avatar-edit-icon svg {
  width: 10px;
  height: 10px;
  color: var(--dark);
}

.profile-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.profile-modal {
  background: var(--white);
  border-radius: 24px;
  max-width: 420px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.profile-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.3s;
  backdrop-filter: blur(4px);
}

.profile-modal-close:hover {
  background: rgba(255,255,255,0.3);
}

.profile-modal-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
}

.profile-modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-top: 16px;
}

.profile-photo-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
}

.profile-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.3);
  transition: opacity 0.3s;
}

.profile-photo-wrapper:hover .profile-photo {
  opacity: 0.7;
}

.profile-photo-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 36px;
  height: 36px;
  background: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 3px solid var(--white);
  transition: transform 0.3s;
}

.profile-photo-edit:hover {
  transform: scale(1.1);
}

.profile-photo-edit svg {
  width: 16px;
  height: 16px;
  color: var(--dark);
}

.profile-modal-body {
  padding: 28px;
}

.profile-field {
  margin-bottom: 20px;
}

.profile-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-field input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--dark);
  transition: border-color 0.3s;
  background: var(--cream);
}

.profile-field input:focus {
  outline: none;
  border-color: var(--primary);
}

.profile-field input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.profile-email-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-email-row input {
  flex: 1;
}

.email-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #00875a;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.email-verified svg {
  width: 16px;
  height: 16px;
}

.btn-verify-email {
  padding: 8px 14px;
  border: 2px solid var(--primary);
  border-radius: 10px;
  background: transparent;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
  transition: all 0.3s;
}

.btn-verify-email:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-reset-password {
  width: 100%;
  padding: 11px 16px;
  border: 2px solid var(--primary);
  border-radius: 12px;
  background: transparent;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.3s;
}

.btn-reset-password:hover {
  background: var(--primary);
  color: var(--white);
}

.profile-upload-status {
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 20px;
  margin-bottom: 16px;
  text-align: center;
}

.profile-upload-status.success { color: #00875a; }
.profile-upload-status.error { color: #d32f2f; }
.profile-upload-status.loading { color: var(--primary); }

.btn-save-profile {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.3s;
}

.btn-save-profile:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(93, 6, 6, 0.3);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .auth-container {
    flex-direction: column;
    max-width: 420px;
    min-height: auto;
  }

  .auth-panel { width: 100%; }

  .panel-overlay {
    position: relative;
    padding: 32px 28px;
    border-radius: 0;
  }

  .panel-form { padding: 28px 24px; }

  .panel-left .panel-overlay { display: none; }

  .panel-right .panel-overlay {
    position: relative;
    opacity: 1;
    pointer-events: all;
    transform: none;
    order: -1;
  }

  .panel-right .panel-form {
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
  }

  .auth-container.register-active .panel-left .panel-form {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    pointer-events: none;
  }

  .auth-container.register-active .panel-left .panel-overlay {
    display: flex;
    position: relative;
    opacity: 1;
    pointer-events: all;
    transform: none;
    order: -1;
  }

  .auth-container.register-active .panel-right .panel-overlay { display: none; }

  .auth-container.register-active .panel-right .panel-form {
    opacity: 1;
    pointer-events: all;
    max-height: 600px;
    padding: 28px 24px;
  }

  .back-home {
    top: 12px;
    left: 12px;
  }

  .dashboard-nav {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 8px;
  }

  .dashboard-body {
    flex-direction: column;
  }

  .dash-sidebar {
    width: 100%;
    min-width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding: 0 12px;
  }

  .sidebar-btn {
    padding: 10px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .sidebar-btn span { display: none; }

  .sidebar-btn svg {
    width: 22px;
    height: 22px;
  }

  .dash-main { padding: 20px 16px; }

  .welcome-banner {
    padding: 24px 20px;
    text-align: center;
  }

  .welcome-banner h2 { font-size: 1.3rem; }

  .cursos-dash-grid {
    grid-template-columns: 1fr;
  }

  .curso-card-body {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-whatsapp-curso {
    justify-content: center;
  }

  .livros-grid,
  .rituais-grid {
    grid-template-columns: 1fr;
  }

  .video-modal {
    max-width: 100%;
    border-radius: 16px;
  }

  .livro-modal {
    max-width: 100%;
    border-radius: 20px;
  }

  .livro-modal-body {
    padding: 20px;
  }

  .livro-modal-body .livro-modal-actions {
    flex-direction: column;
  }
}
