/* ============================================================
   MEUSITE — Tema Azul Profissional
   ============================================================ */

/* ---------- Variáveis ---------- */
:root {
  --blue-900: #0a1628;
  --blue-800: #0f2044;
  --blue-700: #1a3a6b;
  --blue-600: #1e4d9b;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-300: #60a5fa;
  --blue-200: #93c5fd;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;
  --accent:   #06b6d4;   /* cyan accent */
  --accent2:  #f59e0b;   /* amber accent */
  --white:    #ffffff;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-700: #334155;
  --text-dark:#1e293b;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.12);
  --shadow-md: 0 4px 16px rgba(37,99,235,.15);
  --shadow-lg: 0 8px 32px rgba(37,99,235,.20);
  --radius:    12px;
  --radius-sm: 8px;
  --font-main: 'Nunito', sans-serif;
  --font-head: 'Poppins', sans-serif;
  --transition:.25s ease;
}

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

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background: var(--gray-100);
  line-height: 1.7;
}

h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); font-weight: 700; }
.fw-800 { font-weight: 800 !important; }

a { color: var(--blue-500); text-decoration: none; }
a:hover { color: var(--blue-700); }

img { max-width: 100%; height: auto; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--blue-100); }
::-webkit-scrollbar-thumb { background: var(--blue-500); border-radius: 3px; }

/* ============================================================
   NAVBAR
   ============================================================ */
#mainNav {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 60%, var(--blue-700) 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
  padding: .75rem 0;
}

.navbar-brand {
  font-family: var(--font-head);
  font-size: 1.4rem;
  letter-spacing: -.5px;
  color: var(--white) !important;
}
.navbar-brand i { color: var(--accent); }

.nav-link {
  font-weight: 600;
  font-size: .92rem;
  padding: .5rem .9rem !important;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,.12);
  color: var(--white) !important;
}
.nav-link.active { background: rgba(6,182,212,.20); }

.dropdown-menu-dark {
  background: var(--blue-800);
  border: 1px solid rgba(255,255,255,.08);
}
.dropdown-item { font-size: .9rem; padding: .5rem 1.1rem; }
.dropdown-item:hover { background: rgba(255,255,255,.1); }

/* Avatar circle */
.avatar-circle {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--blue-500));
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 50%, var(--blue-700) 100%);
  color: var(--white);
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  position: relative;
}
.hero-title span { color: var(--accent); }
.hero-sub {
  font-size: 1.1rem;
  opacity: .85;
  max-width: 540px;
  position: relative;
}
.hero-badge {
  display: inline-block;
  background: rgba(6,182,212,.2);
  border: 1px solid rgba(6,182,212,.4);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}
.hero-shape {
  position: absolute;
  right: -80px; top: -80px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(6,182,212,.15) 0%, transparent 70%);
  border-radius: 50%;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  background: var(--white);
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img-placeholder {
  height: 180px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.4);
  font-size: 3rem;
}

.course-card .card-body { padding: 1.4rem; }
.course-level {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--blue-800);
  position: relative;
  display: inline-block;
  padding-bottom: .5rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 50px; height: 4px;
  background: linear-gradient(90deg, var(--blue-500), var(--accent));
  border-radius: 2px;
}
.section-title.text-center::after { left: 50%; transform: translateX(-50%); }

.section-label {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  display: block;
  margin-bottom: .3rem;
}

/* ============================================================
   STAT BOXES
   ============================================================ */
.stat-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.8rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--blue-500);
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--blue-700);
  line-height: 1;
}
.stat-label { font-size: .85rem; color: var(--gray-500); margin-top: .3rem; }

/* ============================================================
   FEATURE ITEMS
   ============================================================ */
.feature-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--blue-100), var(--blue-200));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--blue-600);
  flex-shrink: 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  border: none;
  border-radius: 8px;
  font-weight: 700;
  padding: .6rem 1.5rem;
  box-shadow: 0 4px 12px rgba(37,99,235,.35);
  transition: all var(--transition);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37,99,235,.45);
}

.btn-outline-primary {
  border-color: var(--blue-500);
  color: var(--blue-500);
  border-radius: 8px;
  font-weight: 700;
}
.btn-outline-primary:hover {
  background: var(--blue-500);
  border-color: var(--blue-500);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #0891b2);
  border: none;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  padding: .6rem 1.5rem;
  transition: all var(--transition);
}
.btn-accent:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  color: #fff;
}

/* ============================================================
   FORMS / AUTH
   ============================================================ */
.auth-wrapper {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 100%);
}
.auth-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(37,99,235,.15);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  margin: auto;
}
.auth-card .auth-logo {
  font-size: 2rem;
  color: var(--blue-600);
  margin-bottom: 1rem;
}
.auth-divider {
  position: relative;
  text-align: center;
  margin: 1.2rem 0;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0;
  width: 100%; height: 1px;
  background: var(--gray-200);
}
.auth-divider span {
  position: relative;
  background: var(--white);
  padding: 0 .75rem;
  color: var(--gray-500);
  font-size: .85rem;
}

.form-control, .form-select {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  padding: .6rem .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-label { font-weight: 600; font-size: .9rem; color: var(--gray-700); }
.input-group-text {
  background: var(--blue-50);
  border: 2px solid var(--gray-200);
  color: var(--blue-500);
}

/* ============================================================
   ADMIN / DASHBOARD
   ============================================================ */
.admin-sidebar {
  background: linear-gradient(180deg, var(--blue-900), var(--blue-800));
  min-height: 100vh;
  padding: 1.5rem 0;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.5rem;
  color: rgba(255,255,255,.75);
  font-weight: 600;
  font-size: .92rem;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.admin-nav-link:hover, .admin-nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,.08);
  border-left-color: var(--accent);
}
.admin-nav-link i { font-size: 1.1rem; }

.dash-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--blue-500);
}
.dash-card.accent { border-left-color: var(--accent); }
.dash-card.warning { border-left-color: var(--accent2); }
.dash-card.success { border-left-color: #22c55e; }

/* ============================================================
   TABLES
   ============================================================ */
.table-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.table-card .table { margin: 0; }
.table thead th {
  background: linear-gradient(135deg, var(--blue-800), var(--blue-700));
  color: var(--white);
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: none;
  padding: 1rem 1.2rem;
}
.table tbody td { padding: .85rem 1.2rem; vertical-align: middle; }
.table tbody tr:hover { background: var(--blue-50); }
.table-striped tbody tr:nth-of-type(odd) { background: var(--gray-100); }

/* ============================================================
   BADGES
   ============================================================ */
.badge { font-weight: 600; letter-spacing: .03em; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  background: linear-gradient(135deg, var(--blue-800), var(--blue-700));
  color: var(--white);
  padding: 3rem 0 2.5rem;
  margin-bottom: 2rem;
}
.page-header h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }
.breadcrumb-item a { color: rgba(255,255,255,.75); }
.breadcrumb-item.active { color: rgba(255,255,255,.55); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer-main {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-800));
  color: var(--white);
}
.footer-brand {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--white) !important;
}
.footer-brand i { color: var(--accent); }
.footer-heading {
  color: var(--accent);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .45rem; }
.footer-links a, .footer-links li {
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-divider { border-color: rgba(255,255,255,.1); margin: 0; }
.text-blue-light { color: rgba(255,255,255,.5); }
.social-icons a {
  color: rgba(255,255,255,.6);
  font-size: 1.25rem;
  transition: color var(--transition);
}
.social-icons a:hover { color: var(--accent); }

/* ============================================================
   UTILS
   ============================================================ */
.bg-blue-gradient {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
}
.text-accent { color: var(--accent) !important; }
.text-blue { color: var(--blue-500) !important; }
.border-blue { border-color: var(--blue-200) !important; }

.rounded-xl { border-radius: var(--radius) !important; }
.shadow-blue { box-shadow: var(--shadow-md) !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero { padding: 4rem 0 3rem; }
  .auth-card { padding: 2rem 1.2rem; margin: 1rem; }
  .stat-box { padding: 1.2rem; }
  .stat-number { font-size: 2rem; }
  .page-header { padding: 2rem 0 1.5rem; }
}

@media (max-width: 576px) {
  .hero-title { font-size: 1.8rem; }
  .section-title { font-size: 1.4rem; }
  .table-responsive { font-size: .85rem; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  animation: fadeInUp .5s ease both;
}
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
