/* =============================================
   Custom LMS Tridaya — Navy Theme Override
   Warna utama mengikuti logo Tridaya: #1B3A7A (Navy)
   ============================================= */

/* =============================================
   NAVY COLOR PALETTE (Tridaya)
   --navy-dark:    #0d2352  (sangat gelap)
   --navy:         #1B3A7A  (utama / primary)
   --navy-mid:     #1e4d9b  (medium)
   --navy-light:   #2563c7  (terang)
   --navy-accent:  #1a7bb8  (accent biru terang)
   ============================================= */

/* ---- CSS Variables Global ---- */
:root {
  --lms-primary:       #1B3A7A;
  --lms-primary-dark:  #0d2352;
  --lms-primary-mid:   #1e4d9b;
  --lms-primary-light: #2563c7;
  --lms-accent:        #1a7bb8;
  --lms-primary-soft:  rgba(27, 58, 122, 0.10);
  --lms-primary-soft2: rgba(27, 58, 122, 0.06);
}

/* =============================================
   OVERRIDE BOOTSTRAP PRIMARY COLOR
   ============================================= */
.btn-primary,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--lms-primary) !important;
  border-color: var(--lms-primary) !important;
  color: white !important;
}
.btn-primary:hover {
  background-color: var(--lms-primary-dark) !important;
  border-color: var(--lms-primary-dark) !important;
}
.btn-outline-primary {
  color: var(--lms-primary) !important;
  border-color: var(--lms-primary) !important;
}
.btn-outline-primary:hover {
  background-color: var(--lms-primary) !important;
  color: white !important;
}
.text-primary { color: var(--lms-primary) !important; }
.bg-primary    { background-color: var(--lms-primary) !important; }
.border-primary { border-color: var(--lms-primary) !important; }
.badge.bg-primary { background-color: var(--lms-primary) !important; }
a { color: var(--lms-primary); }
a:hover { color: var(--lms-primary-dark); }

/* Form focus ring */
.form-control:focus,
.form-select:focus {
  border-color: var(--lms-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(27, 58, 122, 0.20) !important;
}
.form-check-input:checked {
  background-color: var(--lms-primary) !important;
  border-color: var(--lms-primary) !important;
}

/* Pagination */
.page-item.active .page-link {
  background-color: var(--lms-primary) !important;
  border-color: var(--lms-primary) !important;
}
.page-link { color: var(--lms-primary) !important; }

/* Progress */
.progress-bar { background-color: var(--lms-primary) !important; }

/* =============================================
   TOPBAR / HEADER NAVY
   ============================================= */
.topbar {
  background-color: var(--lms-primary) !important;
  border-bottom: 1px solid var(--lms-primary-dark) !important;
}
.topbar .navbar-header,
.topbar nav,
.topbar .app-header {
  background-color: var(--lms-primary) !important;
}

/* Header text & icons */
.topbar .nav-link,
.topbar .header-item,
.topbar span,
.topbar i {
  color: rgba(255,255,255,0.85) !important;
}
.topbar .nav-link:hover i,
.topbar .nav-link:hover span {
  color: white !important;
}

/* Hamburger icon */
.topbar .sidebartoggler i {
  color: rgba(255,255,255,0.9) !important;
}

/* App title in header */
.topbar .app-title,
.topbar .fw-semibold {
  color: white !important;
}

/* Keluar button in header */
.topbar .btn-outline-danger {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.4) !important;
  color: white !important;
}
.topbar .btn-outline-danger:hover {
  background: rgba(255,255,255,0.25) !important;
}

/* Date/Time badges in header */
.topbar .badge {
  color: white !important;
}

/* =============================================
   SIDEBAR NAVY
   ============================================= */
.left-sidebar {
  background-color: white !important;
  border-right: 1px solid #e8edf4 !important;
}

/* ---- Logo Mini / Full Toggle ---- */
.logo-mini { display: none !important; }
.logo-full { display: block !important; }
body[data-sidebartype="mini-sidebar"] .logo-full { display: none !important; }
body[data-sidebartype="mini-sidebar"] .logo-mini { display: block !important; }

/* Logo responsive */
.logo-full-img {
  max-width: 170px;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.logo-mini-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Nav caption color */
.sidebar-nav .nav-small-cap {
  color: var(--lms-primary) !important;
  opacity: 0.7;
  font-weight: 700;
}

/* ---- Parent menu aktif: navy + putih ---- */
.sidebar-nav > ul > .sidebar-item > .sidebar-link.active {
  background: var(--lms-primary) !important;
  color: white !important;
  border-radius: 7px;
  border-left: none !important;
}
.sidebar-nav > ul > .sidebar-item > .sidebar-link.active i,
.sidebar-nav > ul > .sidebar-item > .sidebar-link.active span {
  color: white !important;
}

/* ---- Parent menu hover ---- */
.sidebar-nav > ul > .sidebar-item > .sidebar-link:hover {
  background: var(--lms-primary-soft) !important;
  color: var(--lms-primary) !important;
  border-radius: 7px;
}
.sidebar-nav > ul > .sidebar-item > .sidebar-link:hover i,
.sidebar-nav > ul > .sidebar-item > .sidebar-link:hover span {
  color: var(--lms-primary) !important;
}

/* ---- Sub-menu aktif: navy text + garis kiri ---- */
.sidebar-nav .first-level .sidebar-item .sidebar-link.active,
.sidebar-nav .first-level .sidebar-item .router-link-active.sidebar-link,
.sidebar-nav .first-level .sidebar-item .router-link-exact-active.sidebar-link {
  background: var(--lms-primary-soft) !important;
  color: var(--lms-primary) !important;
  border-left: 3px solid var(--lms-primary) !important;
  border-radius: 0 7px 7px 0 !important;
}
.sidebar-nav .first-level .sidebar-item .sidebar-link.active i,
.sidebar-nav .first-level .sidebar-item .sidebar-link.active span,
.sidebar-nav .first-level .sidebar-item .router-link-active.sidebar-link i,
.sidebar-nav .first-level .sidebar-item .router-link-active.sidebar-link span,
.sidebar-nav .first-level .sidebar-item .router-link-exact-active.sidebar-link i,
.sidebar-nav .first-level .sidebar-item .router-link-exact-active.sidebar-link span {
  color: var(--lms-primary) !important;
}

/* Sub-menu hover */
.sidebar-nav .first-level .sidebar-item .sidebar-link:hover {
  background: var(--lms-primary-soft2) !important;
  color: var(--lms-primary) !important;
  border-radius: 7px;
}
.sidebar-nav .first-level .sidebar-item .sidebar-link:hover i,
.sidebar-nav .first-level .sidebar-item .sidebar-link:hover span {
  color: var(--lms-primary) !important;
}

/* ---- Dropdown Submenu show/hide ---- */
.collapse.first-level { display: none; }
.collapse.first-level.in { display: block !important; }

/* =============================================
   CARD & UI ELEMENTS
   ============================================= */

/* Force Light Mode */
body, html {
  background-color: #f0f3f8 !important;
  color: #2a3547 !important;
}

/* Card header table navy */
.table thead th[style*="background:#2196f2"],
.table thead th[style*="background: #2196f2"] {
  background: var(--lms-primary) !important;
}

/* Modal header gradient navy */
[style*="background:#2196f2"],
[style*="background: #2196f2"],
[style*="background: linear-gradient(135deg, #1976d2"] {
  background: linear-gradient(135deg, var(--lms-primary-dark), var(--lms-primary)) !important;
}

/* Stat Cards Dashboard */
.stat-card-hover {
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12) !important;
}

/* Badge new */
.badge-new {
  font-size: 9px;
  background: #4caf50;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
}

/* =============================================
   LOGIN PAGE GRADIENT
   ============================================= */
.radial-gradient {
  background: linear-gradient(135deg, #c5d0e8 0%, #d0d6ed 40%, #c8d4e8 70%, #b8c8de 100%) !important;
}

/* Login card button */
.auth-btn {
  background-color: var(--lms-primary) !important;
  border-color: var(--lms-primary) !important;
}
.auth-btn:hover {
  background-color: var(--lms-primary-dark) !important;
  border-color: var(--lms-primary-dark) !important;
}
