/* ═══════════════════════════════════════════════════════
   RH Senior – Curso de Design Organizacional
   Custom Stylesheet  |  Bootstrap 5 override
═══════════════════════════════════════════════════════ */

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

:root {
  --blue:         #1e3c72;
  --blue-mid:     #2a5298;
  --blue-light:   #dbeafe;
  --orange:       #e85d04;
  --orange-light: #fff3e0;
  --bg:           #f0f4ff;
  --card-shadow:  0 2px 16px rgba(30,60,114,.10);
  --radius:       12px;
}

/* ─── Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: #1e293b;
  min-height: 100vh;
}
a { color: var(--blue-mid); }
a:hover { color: var(--orange); }

/* ─── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }

/* ─── Navbar ─────────────────────────────────────────── */
.navbar-custom {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  box-shadow: 0 2px 20px rgba(30,60,114,.25);
  padding: 0 1.5rem;
  min-height: 64px;
}
.navbar-custom .navbar-brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff !important;
  letter-spacing: -.3px;
}
.navbar-custom .navbar-brand span { color: var(--orange); }
.navbar-custom .nav-link {
  color: rgba(255,255,255,.82) !important;
  font-weight: 500;
  font-size: .9rem;
  padding: 1.2rem .85rem !important;
  border-bottom: 3px solid transparent;
  transition: all .2s;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: #fff !important;
  border-bottom-color: var(--orange);
}
.navbar-custom .dropdown-menu {
  border: none;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  border-radius: 10px;
  padding: .5rem;
}
.navbar-custom .dropdown-item { border-radius: 6px; font-size: .9rem; padding: .5rem .85rem; }
.navbar-custom .dropdown-item:hover { background: var(--blue-light); color: var(--blue); }
.badge-admin {
  background: var(--orange);
  color: #fff;
  font-size: .7rem;
  padding: .2rem .5rem;
  border-radius: 20px;
  font-weight: 700;
  vertical-align: middle;
}

/* ─── Page Header ───────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  color: #fff;
  padding: 2.5rem 0;
  margin-bottom: 2rem;
}
.page-header h1 { font-size: 1.7rem; font-weight: 800; margin: 0; }
.page-header p  { margin: .4rem 0 0; opacity: .82; font-size: .95rem; }

/* ─── Cards ─────────────────────────────────────────── */
.card-custom {
  background: #fff;
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: transform .2s, box-shadow .2s;
}
.card-custom:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(30,60,114,.16); }

.stat-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stat-card.blue   { background: linear-gradient(135deg, var(--blue), var(--blue-mid)); }
.stat-card.orange { background: linear-gradient(135deg, var(--orange), #f48c06); }
.stat-card.teal   { background: linear-gradient(135deg, #0d9488, #0891b2); }
.stat-card.violet { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.stat-card h2  { font-size: 2.4rem; font-weight: 800; margin: 0; }
.stat-card p   { margin: .3rem 0 0; opacity: .88; font-size: .9rem; }
.stat-card .icon-bg {
  position: absolute; right: -12px; bottom: -12px;
  font-size: 5rem; opacity: .15;
}

/* ─── Module Card ──────────────────────────────────── */
.module-card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  background: #fff;
}
.module-card:hover { transform: translateY(-4px); box-shadow: 0 10px 35px rgba(30,60,114,.18); }
.module-card .module-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  padding: 1.2rem 1.4rem;
  color: #fff;
}
.module-card .module-header .module-num {
  background: rgba(255,255,255,.18);
  border-radius: 8px;
  padding: .2rem .6rem;
  font-size: .78rem;
  font-weight: 600;
}
.module-card .module-body { padding: 1.3rem 1.4rem; }
.lesson-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .8rem;
  border-radius: 8px;
  text-decoration: none;
  color: #374151;
  font-size: .88rem;
  transition: background .15s;
}
.lesson-item:hover { background: var(--blue-light); color: var(--blue); }
.lesson-item .lesson-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--orange-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
  font-size: .8rem;
  flex-shrink: 0;
}

/* ─── Material / Tool Card ──────────────────────────── */
.file-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  margin-bottom: .8rem;
  transition: box-shadow .2s;
}
.file-card:hover { box-shadow: 0 6px 24px rgba(30,60,114,.16); }
.file-card .file-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.file-card .file-icon.pdf   { background: #fee2e2; color: #dc2626; }
.file-card .file-icon.doc   { background: #dbeafe; color: #1d4ed8; }
.file-card .file-icon.xls   { background: #d1fae5; color: #059669; }
.file-card .file-icon.zip   { background: #fef3c7; color: #d97706; }
.file-card .file-icon.other { background: var(--orange-light); color: var(--orange); }
.file-card .file-info h6   { margin: 0 0 .25rem; font-size: .95rem; font-weight: 600; }
.file-card .file-info span  { font-size: .8rem; color: #6b7280; }

/* ─── Video Player ──────────────────────────────────── */
.video-wrapper {
  position: relative;
  padding-top: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ─── Buttons ───────────────────────────────────────── */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  padding: .55rem 1.3rem;
  transition: opacity .2s, transform .15s;
}
.btn-primary-custom:hover { opacity: .88; color: #fff; transform: translateY(-1px); }
.btn-orange {
  background: linear-gradient(135deg, var(--orange), #f48c06);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  padding: .55rem 1.3rem;
  transition: opacity .2s, transform .15s;
}
.btn-orange:hover { opacity: .88; color: #fff; transform: translateY(-1px); }

/* ─── Forms ─────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 .2rem rgba(42,82,152,.15);
}
.form-label { font-weight: 500; font-size: .9rem; color: #374151; }
.input-group-text { background: var(--blue-light); border-color: #e2e8f0; color: var(--blue); }

/* ─── Admin Sidebar ─────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px;
  background: linear-gradient(180deg, #0f2247 0%, #1e3c72 100%);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.sidebar .sidebar-brand {
  padding: 1.6rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar .sidebar-brand h5 { color: #fff; font-weight: 800; margin: 0; font-size: 1rem; }
.sidebar .sidebar-brand small { color: rgba(255,255,255,.55); font-size: .75rem; }
.sidebar .sidebar-brand .badge { background: var(--orange); }
.sidebar nav { padding: 1rem 0; flex: 1; }
.sidebar nav .nav-section {
  color: rgba(255,255,255,.4);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .8rem 1.4rem .3rem;
}
.sidebar .nav-item a {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  padding: .65rem 1.4rem;
  font-size: .88rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.sidebar .nav-item a:hover,
.sidebar .nav-item a.active {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-left-color: var(--orange);
}
.sidebar .nav-item a i { width: 18px; text-align: center; font-size: .9rem; }
.sidebar .sidebar-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}
.admin-content {
  margin-left: 250px;
  flex: 1;
  min-height: 100vh;
  background: #f1f5f9;
}
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: .9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.admin-topbar h4 { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--blue); }
.admin-main { padding: 2rem; }

/* ─── Table ─────────────────────────────────────────── */
.table-custom thead th {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: .83rem;
  letter-spacing: .03em;
  border: none;
  padding: .85rem 1rem;
}
.table-custom tbody td { padding: .8rem 1rem; vertical-align: middle; font-size: .88rem; }
.table-custom tbody tr:hover { background: var(--blue-light); }
.table-custom { border-radius: 10px; overflow: hidden; box-shadow: var(--card-shadow); }

/* ─── Badges ────────────────────────────────────────── */
.badge-active   { background: #dcfce7; color: #166534; font-size: .75rem; padding: .3rem .65rem; border-radius: 20px; }
.badge-inactive { background: #fee2e2; color: #991b1b; font-size: .75rem; padding: .3rem .65rem; border-radius: 20px; }
.badge-pending  { background: #fef3c7; color: #92400e; font-size: .75rem; padding: .3rem .65rem; border-radius: 20px; }

/* ─── Login Page ────────────────────────────────────── */
.login-page {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 60%, #0ea5e9 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 2.5rem 2.2rem;
  width: 100%;
  max-width: 420px;
}
.login-card .logo-wrap { text-align: center; margin-bottom: 1.6rem; }
.login-card .logo-wrap h2 { color: var(--blue); font-weight: 800; font-size: 1.3rem; margin: .4rem 0 .1rem; }
.login-card .logo-wrap span { color: var(--orange); }
.login-card .logo-wrap p { font-size: .82rem; color: #6b7280; margin: 0; }
.login-card .logo-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: .5rem;
}
.btn-login {
  background: linear-gradient(135deg, var(--orange), #f48c06);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  padding: .75rem;
  width: 100%;
  transition: opacity .2s;
}
.btn-login:hover { opacity: .88; color: #fff; }

/* ─── Footer ────────────────────────────────────────── */
footer.site-footer {
  background: var(--blue);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 1.2rem;
  font-size: .8rem;
  margin-top: auto;
}
footer.site-footer strong { color: var(--orange); }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { width: 100%; height: auto; position: relative; }
  .admin-content { margin-left: 0; }
  .admin-layout { flex-direction: column; }
  .admin-main { padding: 1rem; }
}
