/* ========================================
   MÉTODO SHOPEE LUCRATIVO - Área de Membros
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

:root {
  --primary: #EE4D2D;
  --primary-dark: #D4421F;
  --primary-light: #FF6B4A;
  --gold: #C5A55A;
  --gold-light: #D4B96A;
  --gold-dark: #A88B3D;
  --bg-dark: #0B0B0F;
  --bg-card: #14141A;
  --bg-card-hover: #1A1A22;
  --bg-surface: #1E1E28;
  --bg-input: #1A1A24;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0B0;
  --text-muted: #6B6B7B;
  --border: #2A2A35;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --silver: #C0C0C0;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-container {
  display: flex;
  min-height: 100vh;
}

.login-banner {
  flex: 1;
  background: linear-gradient(135deg, #1a0a00 0%, #2d1200 50%, #0B0B0F 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(238,77,45,0.08) 0%, transparent 60%);
}

.login-banner img {
  max-width: 80%;
  max-height: 70vh;
  object-fit: contain;
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
}

.login-form-container {
  width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
}

.login-logo {
  width: 200px;
  margin-bottom: 40px;
}

.login-form-container h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-form-container p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 15px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(238,77,45,0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(238,77,45,0.3);
}

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

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #1a1a1a;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.login-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

/* ========================================
   LAYOUT - SIDEBAR + MAIN
   ======================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-logo {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo img {
  width: 100%;
  max-width: 180px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(238,77,45,0.1);
  color: var(--primary);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-user {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-plan {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.plan-prata { color: var(--silver); }
.plan-gold { color: var(--gold); }
.plan-vip { color: var(--primary); }

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  max-width: calc(100vw - 260px);
}

/* ========================================
   HEADER
   ======================================== */
.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

.welcome-banner {
  background: linear-gradient(135deg, rgba(238,77,45,0.15) 0%, rgba(197,165,90,0.1) 100%);
  border: 1px solid rgba(238,77,45,0.2);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.welcome-banner img {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius);
}

.welcome-text h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.welcome-text p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* ========================================
   CARDS DE TRILHA
   ======================================== */
.trilha-section {
  margin-bottom: 40px;
}

.trilha-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.trilha-section h2 svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.trilha-section p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.section-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-prata { background: rgba(192,192,192,0.15); color: var(--silver); }
.badge-gold { background: rgba(197,165,90,0.15); color: var(--gold); }
.badge-vip { background: rgba(238,77,45,0.15); color: var(--primary); }

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

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(238,77,45,0.3);
}

.module-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.module-card.locked:hover {
  transform: none;
  box-shadow: none;
}

.module-card-image {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background: var(--bg-surface);
}

.module-card-body {
  padding: 16px;
}

.module-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.module-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-surface);
  border-radius: 2px;
  overflow: hidden;
}

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

.progress-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11,11,15,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}

.lock-overlay svg {
  width: 32px;
  height: 32px;
  color: var(--gold);
}

.lock-overlay span {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
}

/* ========================================
   MODULE PAGE - AULAS
   ======================================== */
.module-header {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  align-items: flex-start;
}

.module-header-img {
  width: 200px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.module-header-info {
  flex: 1;
}

.module-header-info h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.module-header-info p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.module-stats {
  display: flex;
  gap: 24px;
}

.module-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.module-stat svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
  transition: var(--transition);
}

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

.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

.lesson-item:hover {
  border-color: rgba(238,77,45,0.3);
  background: var(--bg-card-hover);
}

.lesson-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.lesson-item.completed .lesson-number {
  background: rgba(34,197,94,0.15);
  color: var(--success);
}

.lesson-info { flex: 1; }

.lesson-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 2px;
}

.lesson-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.lesson-check {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.lesson-item.completed .lesson-check {
  background: var(--success);
  border-color: var(--success);
}

.lesson-item.completed .lesson-check svg {
  color: white;
}

/* ========================================
   PROFILE PAGE
   ======================================== */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 600px;
  margin-bottom: 24px;
}

.profile-card h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.plan-badge.prata { background: rgba(192,192,192,0.15); color: var(--silver); }
.plan-badge.gold { background: rgba(197,165,90,0.15); color: var(--gold); border: 1px solid rgba(197,165,90,0.3); }
.plan-badge.vip { background: rgba(238,77,45,0.15); color: var(--primary); border: 1px solid rgba(238,77,45,0.3); }

/* ========================================
   ADMIN
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-card-value {
  font-size: 32px;
  font-weight: 700;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.data-table th {
  background: var(--bg-surface);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.data-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-top: 1px solid var(--border);
}

.data-table tr:hover td {
  background: var(--bg-card-hover);
}

.status-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-active { background: rgba(34,197,94,0.15); color: var(--success); }
.status-inactive { background: rgba(245,158,11,0.15); color: var(--warning); }
.status-cancelled { background: rgba(239,68,68,0.15); color: var(--danger); }

/* ========================================
   NOTIFICATIONS / TOASTS
   ======================================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }

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

/* ========================================
   LOADING
   ======================================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 101;
}

.mobile-header img { height: 32px; }

.hamburger {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

@media (max-width: 768px) {
  .login-container { flex-direction: column; }
  .login-banner { display: none; }
  .login-form-container {
    width: 100%;
    padding: 32px 24px;
    min-height: 100vh;
  }

  .mobile-header { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    z-index: 100;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open { display: block; }

  .main-content {
    margin-left: 0;
    max-width: 100%;
    padding: 80px 16px 24px;
  }

  .welcome-banner {
    flex-direction: column;
    text-align: center;
  }

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

  .module-header {
    flex-direction: column;
  }

  .module-header-img { width: 120px; }

  .module-stats { flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 480px) {
  .modules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .module-card-body { padding: 10px; }
  .module-card-title { font-size: 13px; }
  .module-card-desc { display: none; }
}
