/* ============================================================
   MF RIBEIRO - Estilos Globais
   Paleta: Verde #00A86B | Verde Escuro #006B45 | Preto #101010
   ============================================================ */

:root {
  --green:       #00A86B;
  --green-dark:  #006B45;
  --green-light: #E6F7F1;
  --black:       #101010;
  --gray-dark:   #1F2937;
  --gray-mid:    #374151;
  --gray:        #6B7280;
  --gray-light:  #F3F4F6;
  --white:       #FFFFFF;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --shadow-md:   0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.16);
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --transition:  .25s ease;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: var(--gray-light);
  color: var(--gray-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
img { max-width: 100%; }

/* ---- Typography ---- */
h1,h2,h3,h4,h5,h6 { font-weight: 700; color: var(--gray-dark); }

/* ---- Colors Bootstrap Override ---- */
.bg-primary-brand  { background: var(--green) !important; }
.text-primary-brand{ color: var(--green) !important; }
.btn-primary {
  background: var(--green);
  border-color: var(--green);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.btn-primary:hover  { background: var(--green-dark); border-color: var(--green-dark); transform: translateY(-1px); }
.btn-outline-primary{ color: var(--green); border-color: var(--green); border-radius: var(--radius-sm); font-weight: 600; }
.btn-outline-primary:hover{ background: var(--green); color: #fff; transform: translateY(-1px); }

/* ---- Cards ---- */
.card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-header {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0 !important;
  font-weight: 600;
}

/* ---- Glass Card ---- */
.card-glass {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* ---- Stat Cards (Dashboard) ---- */
.stat-card {
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.stat-card .stat-icon { font-size: 2.5rem; opacity: .9; }
.stat-card .stat-value { font-size: 2rem; font-weight: 800; margin: 0; }
.stat-card .stat-label { font-size: .85rem; opacity: .85; }
.stat-green  { background: linear-gradient(135deg, var(--green), var(--green-dark)); }
.stat-blue   { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.stat-purple { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.stat-orange { background: linear-gradient(135deg, #F59E0B, #D97706); }

/* ---- Navbar ---- */
.navbar-brand { font-weight: 800; font-size: 1.4rem; letter-spacing: -.5px; color: var(--green) !important; line-height:1; }
.navbar-brand img { display:block; }
.navbar-light { background: var(--black); box-shadow: var(--shadow-sm); }
.navbar-dark  { background: var(--black); }
.nav-link { font-weight: 500; transition: color var(--transition); color: rgba(255,255,255,.85) !important; }
.nav-link:hover { color: var(--green) !important; }

/* ---- Sidebar ---- */
.sidebar {
  width: 260px;
  height: 100vh;
  background: var(--black);
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,168,107,.4) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(0,168,107,.4); border-radius: 4px; }
.sidebar .sidebar-brand {
  padding: 24px 20px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--green);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar .nav-link {
  color: rgba(255,255,255,.75);
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  margin: 2px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .9rem;
  transition: all var(--transition);
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: rgba(0,168,107,.15);
  color: var(--green);
}
.sidebar .nav-link i { width: 20px; text-align: center; }
.sidebar .sidebar-section {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 16px 20px 6px;
}

/* ---- Main Content (com sidebar) ---- */
.main-content {
  margin-left: 260px;
  min-height: 100vh;
  transition: margin var(--transition);
}
.page-header {
  background: #fff;
  padding: 20px 28px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-body { padding: 28px; }

/* ---- Hero Section ---- */
.hero {
  background: linear-gradient(135deg, var(--black) 0%, var(--gray-dark) 60%, var(--green-dark) 100%);
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(0,168,107,.25) 0%, transparent 60%);
}
.hero .hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); color: #fff; line-height: 1.15; }
.hero h1 span { color: var(--green); }
.hero p  { color: rgba(255,255,255,.8); font-size: 1.1rem; }
.hero-badge {
  display: inline-block;
  background: rgba(0,168,107,.2);
  color: var(--green);
  border: 1px solid rgba(0,168,107,.4);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ---- Course Cards ---- */
.course-card { border-radius: var(--radius); overflow: hidden; }
.course-card .course-img {
  height: 200px;
  object-fit: cover;
  width: 100%;
}
.course-card .course-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
}
.course-card .badge-workload {
  background: var(--green-light);
  color: var(--green-dark);
  font-size: .75rem;
  padding: 4px 10px;
  border-radius: 50px;
}

/* ---- Progress Bar ---- */
.progress { border-radius: 50px; height: 8px; }
.progress-bar { background: var(--green); border-radius: 50px; }

/* ---- Tables ---- */
.table thead th { background: var(--gray-dark); color: #fff; border: none; font-weight: 600; white-space: nowrap; }
.table tbody tr:hover { background: var(--green-light); }
.table-responsive { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }

/* ---- Forms ---- */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: #D1D5DB;
  padding: .65rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,168,107,.15);
}
.form-label { font-weight: 600; color: var(--gray-dark); margin-bottom: .4rem; }
.input-group-text { background: var(--gray-light); border-color: #D1D5DB; }

/* ---- Badges ---- */
.badge { font-weight: 600; padding: .4em .8em; border-radius: 50px; }

/* ---- Login / Register ---- */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--black), var(--gray-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { font-size: 1.8rem; font-weight: 800; color: var(--green); text-align: center; margin-bottom: 8px; }
.auth-subtitle { color: var(--gray); text-align: center; margin-bottom: 28px; }

/* ---- CTA Flutuante Mobile ---- */
.cta-fixed {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--green);
  padding: 16px;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}
@media (max-width: 767px) {
  .cta-fixed { display: block; }
  .hero { min-height: 70vh; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .page-body { padding: 16px; }
}

/* ---- Checkout Steps ---- */
.checkout-steps { display: flex; gap: 8px; margin-bottom: 28px; }
.checkout-step {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: var(--radius-sm);
  background: #E5E7EB;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray);
  transition: all var(--transition);
}
.checkout-step.active { background: var(--green); color: #fff; }
.checkout-step.done   { background: var(--green-light); color: var(--green-dark); }

/* ---- Lesson Player ---- */
.lesson-sidebar { max-height: calc(100vh - 100px); overflow-y: auto; }
.lesson-item {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}
.lesson-item:hover { background: var(--green-light); }
.lesson-item.active { background: rgba(0,168,107,.15); color: var(--green); }
.lesson-item.locked { opacity: .5; cursor: not-allowed; }
.lesson-item .lesson-check { color: var(--green); }

/* ---- Quiz ---- */
.quiz-option {
  padding: 14px 18px;
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
}
.quiz-option:hover  { border-color: var(--green); background: var(--green-light); }
.quiz-option.selected{ border-color: var(--green); background: var(--green-light); }
.quiz-option.correct { border-color: #10B981; background: #D1FAE5; }
.quiz-option.wrong   { border-color: #EF4444; background: #FEE2E2; }
.quiz-option input   { accent-color: var(--green); }

/* ---- Certificate ---- */
.certificate-preview {
  border: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  background: linear-gradient(135deg, #fff, #F0FDF4);
  position: relative;
}
.certificate-preview::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid var(--green);
  border-radius: calc(var(--radius) - 4px);
  opacity: .3;
  pointer-events: none;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp .5s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }

/* ---- Utilities ---- */
.bg-gradient-green { background: linear-gradient(135deg, var(--green), var(--green-dark)); }
.text-green { color: var(--green) !important; }
.border-green { border-color: var(--green) !important; }
.rounded-xl { border-radius: var(--radius-lg) !important; }
.shadow-card { box-shadow: var(--shadow-md) !important; }
.fw-800 { font-weight: 800; }

/* ---- Scrollbar personalizada ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-light); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 3px; }
