:root {
  --lms-brand: #2563eb;
  --lms-brand-dark: #1d4ed8;
}

body { background: #f7f8fc; }
.sidebar-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--lms-brand), #60a5fa);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .22);
}
.sidebar-brand-text { color: #111827; font-size: 17px; font-weight: 800; white-space: nowrap; }
[data-theme="dark"] .sidebar-brand-text { color: #fff; }
.sidebar.active .sidebar-brand-text { display: none; }
.course-cover {
  min-height: 150px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .95), rgba(14, 165, 233, .82));
  color: #fff;
  position: relative;
  overflow: hidden;
}
.course-cover::after {
  content: '';
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  position: absolute;
  right: -50px;
  bottom: -90px;
}
.course-code { letter-spacing: .08em; text-transform: uppercase; font-size: 11px; font-weight: 700; opacity: .8; }
.progress-thin { height: 8px; }
.avatar-initial {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
  flex-shrink: 0;
}
.stat-card { transition: transform .2s ease, box-shadow .2s ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15, 23, 42, .08); }
.login-panel { min-height: 100vh; }
.login-visual { background: radial-gradient(circle at 25% 20%, rgba(255,255,255,.22), transparent 28%), linear-gradient(135deg, #0f172a, #2563eb 55%, #38bdf8); }
.table td, .table th { vertical-align: middle; }
.content-preline { white-space: pre-line; }
@media (max-width: 991.98px) { .login-visual { min-height: 260px; } }

/* Login SMAIT THI */
.login-visual {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(8, 21, 43, .12) 0%, rgba(8, 21, 43, .82) 86%),
    var(--login-image),
    linear-gradient(135deg, #0f172a, #2563eb 55%, #38bdf8);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.login-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(37, 99, 235, .2), transparent 55%);
  pointer-events: none;
}
.login-visual-content { text-shadow: 0 2px 18px rgba(0, 0, 0, .28); }
.login-school-badge {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, .28);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 700;
}
.login-photo-source {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,.88);
  font-size: 12px;
  text-decoration: none;
}
.login-photo-source:hover { color: #fff; text-decoration: underline; }
.opacity-85 { opacity: .85; }
.demo-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px dashed #d1d5db;
  font-size: 12px;
}
.demo-account-row:first-of-type { border-top: 0; }
.demo-account-row code { color: #334155; font-size: 11px; text-align: right; }
.sidebar-brand-mark { min-width: 42px; padding-inline: 7px; }

/* Materi video */
.module-card { transition: box-shadow .2s ease, transform .2s ease; }
.module-card:hover { box-shadow: 0 12px 28px rgba(15, 23, 42, .08); transform: translateY(-1px); }
.module-video-area iframe { border: 0; background: #0f172a; }
.assignment-link-card { transition: border-color .2s ease, transform .2s ease; }
.assignment-link-card:hover { border-color: #93c5fd !important; transform: translateY(-1px); }
.module-admin-card { transition: border-color .2s ease; }
.module-admin-card:hover { border-color: #bfdbfe !important; }

@media (max-width: 991.98px) {
  .login-visual { min-height: 360px; background-position: center 28%; }
  .login-visual-content { padding-top: 120px !important; }
}
@media (max-width: 575.98px) {
  .login-visual { min-height: 310px; }
  .login-visual h1 { font-size: 1.75rem; }
  .demo-account-row { align-items: flex-start; flex-direction: column; gap: 3px; }
  .demo-account-row code { text-align: left; }
}

/* === Perbaikan layout header dan identitas aplikasi v1.2 === */
.sidebar { overflow: hidden; }
.sidebar-logo {
  overflow: hidden;
  padding: 12px 14px;
  width: 100%;
}
.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.sidebar-brand-mark {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  font-size: 13px;
  letter-spacing: .03em;
}
.sidebar-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: calc(100% - 52px);
  line-height: 1.15;
  overflow: hidden;
}
.sidebar-brand-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}
.sidebar-brand-subtitle {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
}
[data-theme="dark"] .sidebar-brand-subtitle { color: #94a3b8; }
.sidebar.active .sidebar-brand-copy,
.sidebar.active .sidebar-profile-wrap .profile-dropdown__contents { display: none; }
.sidebar.active:hover .sidebar-brand-copy { display: flex; }
.sidebar.active:hover .sidebar-profile-wrap .profile-dropdown__contents { display: inline; }
.sidebar.active .sidebar-brand-link { justify-content: center; }
.sidebar.active:hover .sidebar-brand-link { justify-content: flex-start; }

.navbar-header {
  overflow: visible;
  border-bottom: 1px solid var(--neutral-200);
  padding: 12px 18px;
}
.navbar-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.navbar-title-group,
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.navbar-page-copy { min-width: 0; }
.navbar-page-title {
  margin: 0;
  max-width: min(52vw, 620px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1.25;
}
.navbar-page-role {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}
.navbar-icon-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text-primary-light);
  background: var(--neutral-100);
  font-size: 20px;
}
.metric-icon {
  width: 50px;
  min-width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.filter-panel { position: relative; z-index: 1; }
.min-w-100-px { min-width: 100px; }
.min-w-220-px { min-width: 220px; }
.child-switcher { background: linear-gradient(135deg, rgba(37,99,235,.06), rgba(14,165,233,.03)); }

@media (max-width: 1199.98px) {
  .navbar-header { padding-inline: 14px; }
  .navbar-page-title { max-width: 58vw; font-size: 17px; }
}
@media (max-width: 575.98px) {
  .navbar-header { height: 4.25rem; padding: 10px 12px; }
  .navbar-inner { gap: 8px; }
  .navbar-title-group, .navbar-actions { gap: 8px; }
  .navbar-page-title { max-width: 46vw; font-size: 15px; }
  .navbar-page-role { display: none; }
  .navbar-icon-btn { width: 36px; min-width: 36px; height: 36px; }
  .child-switcher .min-w-220-px { min-width: 100%; width: 100%; }
  .child-switcher form { width: 100%; flex-wrap: wrap; }
}


/* === Identitas resmi SMAIT THI & paket hosting v1.3 === */
.login-brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.login-official-logo {
  display: block;
  width: min(100%, 360px);
  height: auto;
  object-fit: contain;
}
.login-app-label {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(5, 107, 79, .08);
  color: #056b4f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.sidebar-logo {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--neutral-200);
}
.sidebar-brand-link {
  min-height: 58px;
  justify-content: center;
}
.sidebar-official-logo {
  display: block;
  object-fit: contain;
  transition: width .2s ease, opacity .2s ease;
}
.sidebar-official-logo-full {
  width: 176px;
  max-height: 64px;
}
.sidebar-official-logo-mark {
  display: none;
  width: 44px;
  height: 44px;
}
.sidebar.active .sidebar-official-logo-full { display: none; }
.sidebar.active .sidebar-official-logo-mark { display: block; }
.sidebar.active:hover .sidebar-official-logo-full { display: block; }
.sidebar.active:hover .sidebar-official-logo-mark { display: none; }
[data-theme="dark"] .sidebar-official-logo-full {
  filter: drop-shadow(0 1px 1px rgba(255,255,255,.12));
}
@media (max-width: 1199.98px) {
  .sidebar-official-logo-full { width: 164px; }
}
@media (max-width: 575.98px) {
  .login-official-logo { width: min(100%, 300px); }
}


/* === Penyempurnaan navbar & grafik v1.3.1 === */
.theme-toggle-btn {
  border-radius: 999px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  color: #1d4ed8;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .14);
}
.theme-toggle-btn::after { content: none !important; }
.theme-toggle-btn i { font-size: 18px; line-height: 1; }
[data-theme="dark"] .theme-toggle-btn {
  background: linear-gradient(135deg, rgba(15,23,42,.92), rgba(30,41,59,.88));
  color: #f8fafc;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .28);
}
.navbar-actions .dropdown > button {
  box-shadow: 0 10px 24px rgba(37, 99, 235, .12);
}
.stat-card { border-color: rgba(148, 163, 184, .24); }
#learningChart, #studentPerformanceChart, #schoolSummaryChart, #teacherActivityChart, #teacherIndexChart, #parentProgressChart, #attendanceChart {
  min-height: 300px;
}
.apexcharts-tooltip {
  border: 0 !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .16) !important;
  border-radius: 12px !important;
}
.apexcharts-xaxistooltip, .apexcharts-yaxistooltip {
  border-radius: 10px !important;
}
@media (max-width: 575.98px) {
  .theme-toggle-btn i { font-size: 16px; }
  .navbar-actions .dropdown > button { width: 36px; height: 36px; }
  #learningChart, #studentPerformanceChart, #schoolSummaryChart, #teacherActivityChart, #teacherIndexChart, #parentProgressChart, #attendanceChart { min-height: 260px; }
}
