/**
 * curso.css
 * Estilos da Área de Membros / Portal do Aluno (Georgia Cappi — Formação de Tarot)
 * Alinhado 100% à identidade visual da página inicial (Home)
 */

:root {
  --lms-bg: var(--paper, #faf9f7);
  --lms-card: var(--white, #ffffff);
  --lms-card-hover: var(--cream, #f5f3f0);
  --lms-border: var(--sand, #e8e4df);
  --lms-gold: var(--accent, #5c4f42);
  --lms-gold-light: var(--accent-light, #8a7b6a);
  --lms-text: var(--ink, #1f1d1b);
  --lms-text-muted: var(--stone, #6b6560);
  --lms-success: #059669;
  --lms-warning: #d97706;
  --lms-danger: #dc2626;
  --lms-radius: var(--radius, 12px);
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, sans-serif;
}

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

body.lms-body {
  margin: 0;
  padding: 0;
  background: var(--lms-bg);
  color: var(--lms-text);
  font-family: var(--font-body);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--lms-gold);
  text-decoration: none !important;
}

a:hover {
  color: var(--lms-text);
}

.text-gold {
  color: var(--lms-gold) !important;
}

/* Botões do LMS */
.lms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none !important;
  font-family: inherit;
}

.lms-btn-gold {
  background: var(--ink);
  color: var(--paper) !important;
  border-color: var(--ink);
  box-shadow: 0 4px 14px rgba(31, 29, 27, 0.12);
}

.lms-btn-gold:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white) !important;
  transform: translateY(-1px);
}

.lms-btn-outline {
  background: var(--white);
  border-color: var(--lms-border);
  color: var(--lms-text);
}

.lms-btn-outline:hover {
  border-color: var(--lms-gold);
  color: var(--lms-gold);
  background: var(--cream);
}

.lms-btn-sm {
  padding: 6px 14px;
  font-size: 0.84rem;
}

/* Container Principal */
.lms-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 36px clamp(1.25rem, 4vw, 2rem) 60px;
  flex: 1;
  box-sizing: border-box;
}

/* Banner / Hero do Curso */
.lms-hero {
  background: var(--lms-card);
  border: 1px solid var(--lms-border);
  border-radius: var(--lms-radius);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow, 0 12px 40px rgba(31, 29, 27, 0.08));
}

.lms-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lms-gold-light), var(--lms-gold), var(--lms-gold-light));
}

.lms-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lms-gold);
  background: var(--accent-muted, rgba(92, 79, 66, 0.1));
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.lms-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 0 0 12px;
  color: var(--lms-text);
  line-height: 1.25;
  font-weight: 700;
}

.lms-hero p {
  color: var(--lms-text-muted);
  max-width: 780px;
  font-size: 1.05rem;
  margin: 0 0 24px;
  line-height: 1.7;
}

/* Barra de Progresso */
.lms-progress-card {
  background: var(--cream);
  border: 1px solid var(--lms-border);
  border-radius: 10px;
  padding: 16px 20px;
  max-width: 500px;
}

.lms-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--lms-text);
}

.lms-progress-header span:last-child {
  color: var(--lms-gold);
  font-weight: 700;
}

.lms-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--sand);
  border-radius: 999px;
  overflow: hidden;
}

.lms-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--lms-gold), var(--lms-gold-light));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Aviso para Visitantes / Não Logados */
.lms-guest-box {
  background: var(--cream);
  border: 1px solid var(--lms-border);
  border-left: 4px solid var(--lms-gold);
  padding: 18px 22px;
  border-radius: 10px;
  max-width: 600px;
  font-size: 0.95rem;
  color: var(--lms-text);
  line-height: 1.6;
}

/* Módulos e Aulas */
.lms-modules-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.lms-module-card {
  background: var(--lms-card);
  border: 1px solid var(--lms-border);
  border-radius: var(--lms-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(31, 29, 27, 0.04);
}

.lms-module-header {
  padding: 20px 26px;
  background: var(--cream);
  border-bottom: 1px solid var(--lms-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.lms-module-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0;
  color: var(--lms-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.lms-module-header h2 i {
  color: var(--lms-gold);
}

.lms-module-header p {
  margin: 4px 0 0;
  color: var(--lms-text-muted);
  font-size: 0.9rem;
}

.lms-module-header .module-count {
  font-size: 0.85rem;
  color: var(--lms-text-muted);
  font-weight: 600;
  background: var(--white);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--lms-border);
}

.lms-lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  padding: 24px 26px;
}

.lms-lesson-card {
  background: var(--lms-card);
  border: 1px solid var(--lms-border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none !important;
  color: inherit;
}

.lms-lesson-card.unlocked:hover {
  transform: translateY(-2px);
  border-color: var(--lms-gold);
  box-shadow: 0 10px 26px rgba(31, 29, 27, 0.08);
}

.lms-lesson-card.locked {
  opacity: 0.7;
  background: var(--cream);
  border-style: dashed;
  cursor: not-allowed;
}

.lms-lesson-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.lms-lesson-order {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--lms-gold);
  letter-spacing: 0.04em;
}

.lms-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lms-status-badge.completed {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.lms-status-badge.in-review {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.lms-status-badge.locked {
  background: var(--sand);
  color: var(--lms-text-muted);
  border: 1px solid var(--lms-border);
}

.lms-status-badge.available {
  background: var(--accent-muted, rgba(92, 79, 66, 0.1));
  color: var(--lms-gold);
  border: 1px solid rgba(92, 79, 66, 0.2);
}

.lms-lesson-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--lms-text);
  line-height: 1.35;
}

.lms-lesson-desc {
  font-size: 0.88rem;
  color: var(--lms-text-muted);
  margin: 0 0 16px;
  flex: 1;
  line-height: 1.55;
}

.lms-lesson-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--lms-text-muted);
  border-top: 1px solid var(--lms-border);
  padding-top: 12px;
}

/* Sala de Aula (Player) */
.lms-classroom-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 960px) {
  .lms-classroom-layout {
    grid-template-columns: 1fr 340px;
    align-items: start;
  }
}

.lms-player-card {
  background: var(--lms-card);
  border: 1px solid var(--lms-border);
  border-radius: var(--lms-radius);
  overflow: hidden;
  box-shadow: var(--shadow, 0 12px 40px rgba(31, 29, 27, 0.08));
}

.lms-video-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  width: 100%;
}

.lms-video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lms-lesson-info {
  padding: 28px;
}

.lms-lesson-info h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin: 0 0 12px;
  color: var(--lms-text);
  line-height: 1.25;
}

/* Sidebar da Sala de Aula */
.lms-classroom-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lms-sidebar-card {
  background: var(--lms-card);
  border: 1px solid var(--lms-border);
  border-radius: var(--lms-radius);
  padding: 22px;
  box-shadow: 0 4px 20px rgba(31, 29, 27, 0.04);
}

.lms-sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--lms-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lms-sidebar-card h3 i {
  color: var(--lms-gold);
}

/* Formulário de Lição */
.lms-form-box {
  background: var(--cream);
  border: 1px solid var(--lms-border);
  border-radius: 10px;
  padding: 24px;
  margin-top: 28px;
}

.lms-form-box h3 {
  font-family: var(--font-display);
  color: var(--lms-text);
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.lms-question-item {
  margin-bottom: 20px;
}

.lms-question-item label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: var(--lms-text);
}

.lms-question-item textarea {
  width: 100%;
  min-height: 100px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--lms-border);
  border-radius: 8px;
  color: var(--lms-text);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lms-question-item textarea:focus {
  outline: none;
  border-color: var(--lms-gold);
  box-shadow: 0 0 0 3px var(--accent-muted, rgba(92, 79, 66, 0.15));
}

/* Notificações / Status da Lição */
.lms-alert {
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.55;
}

.lms-alert.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #065f46;
}

.lms-alert.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #92400e;
}

.lms-alert.danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #991b1b;
}

.lms-alert.info {
  background: var(--accent-muted, rgba(92, 79, 66, 0.1));
  border: 1px solid rgba(92, 79, 66, 0.2);
  color: var(--lms-text);
}

/* Tela de Autenticação / Login */
.lms-auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 40px 20px;
  background: var(--lms-bg);
}

.lms-auth-box {
  background: var(--lms-card);
  border: 1px solid var(--lms-border);
  border-radius: var(--lms-radius);
  max-width: 440px;
  width: 100%;
  padding: 36px 32px;
  box-shadow: var(--shadow, 0 12px 40px rgba(31, 29, 27, 0.08));
}

.lms-auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.lms-auth-header img {
  max-height: 48px;
  margin: 0 auto 12px;
}

.lms-auth-header h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--lms-text);
  margin: 0 0 6px;
}

.lms-auth-header p {
  color: var(--lms-text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.lms-auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--lms-border);
  margin-bottom: 24px;
}

.lms-auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--lms-text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.lms-auth-tab.active {
  color: var(--lms-text);
  border-bottom-color: var(--lms-gold);
  font-weight: 700;
}

.lms-auth-input-group {
  margin-bottom: 18px;
}

.lms-auth-input-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--lms-text);
}

.lms-auth-input-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--lms-bg);
  border: 1px solid var(--lms-border);
  border-radius: 8px;
  color: var(--lms-text);
  font-size: 0.95rem;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lms-auth-input-group input:focus {
  outline: none;
  border-color: var(--lms-gold);
  box-shadow: 0 0 0 3px var(--accent-muted, rgba(92, 79, 66, 0.15));
}

.lms-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.lms-input-wrap input {
  width: 100%;
  padding-right: 42px;
}

.lms-pass-toggle {
  position: absolute;
  right: 12px;
  background: transparent;
  border: 0;
  color: var(--lms-text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.lms-pass-toggle:hover {
  color: var(--lms-text);
}

.lms-pass-rules {
  background: var(--cream);
  border: 1px solid var(--lms-border);
  border-left: 3px solid var(--lms-gold);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.84rem;
  margin-top: -6px;
  margin-bottom: 16px;
}

.lms-pass-rules-title {
  font-weight: 700;
  color: var(--lms-text);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.lms-rules-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.lms-rule-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--lms-text-muted);
  transition: color 0.2s ease;
}

.lms-rule-item.valid {
  color: #059669;
  font-weight: 600;
}

.lms-rule-item.invalid {
  color: #b91c1c;
}
