/* ============================================================
   PORTAL-FRESH.CSS — Tampilan portal mahasiswa 2026
   Clean, modern, glass, soft gradients
   ============================================================ */

:root {
  --p-bg: #f4f6fb;
  --p-surface: #ffffff;
  --p-surface-2: #f8fafc;
  --p-ink: #0f172a;
  --p-ink-soft: #475569;
  --p-muted: #64748b;
  --p-line: rgba(148, 163, 184, 0.35);
  --p-blue: #2563eb;
  --p-blue-deep: #1e3a8a;
  --p-rose: #e11d48;
  --p-radius: 20px;
  --p-radius-sm: 14px;
  --p-shadow: 0 4px 24px -4px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
  --p-shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, 0.14), 0 8px 16px -6px rgba(37, 99, 235, 0.08);
  --p-font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --p-bg: #0b1220;
  --p-surface: #111827;
  --p-surface-2: #1e293b;
  --p-ink: #f1f5f9;
  --p-ink-soft: #cbd5e1;
  --p-muted: #94a3b8;
  --p-line: rgba(71, 85, 105, 0.5);
  --p-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.4);
  --p-shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ---------- LANDING ---------- */
.portal-landing {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 40px;
  font-family: var(--p-font);
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(37, 99, 235, 0.14), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(225, 29, 72, 0.1), transparent 45%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(37, 99, 235, 0.06), transparent),
    var(--p-bg);
  overflow: hidden;
}

.portal-landing::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  pointer-events: none;
}

.portal-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  z-index: 5;
}

.portal-topbar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--p-ink-soft);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--p-line);
  backdrop-filter: blur(8px);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.portal-topbar a:hover {
  color: var(--p-blue);
  border-color: rgba(37, 99, 235, 0.3);
  background: #fff;
}

[data-theme="dark"] .portal-topbar a {
  background: rgba(17, 24, 39, 0.7);
  color: var(--p-muted);
}

.portal-landing-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  padding: 40px 36px 36px;
  box-shadow: var(--p-shadow-lg);
  text-align: center;
}

[data-theme="dark"] .portal-landing-card {
  background: rgba(17, 24, 39, 0.85);
  border-color: rgba(71, 85, 105, 0.4);
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  margin-bottom: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--p-blue);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 999px;
}

.portal-logo-wrap {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, #eff6ff, #fff1f2);
  border: 1px solid var(--p-line);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px -8px rgba(37, 99, 235, 0.25);
}

.portal-logo-wrap img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.portal-landing-card h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--p-ink);
  margin: 0 0 10px;
  line-height: 1.2;
}

.portal-landing-card .lead {
  font-size: 14.5px;
  color: var(--p-muted);
  line-height: 1.65;
  margin: 0 0 28px;
}

.portal-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-btns a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  transition: transform 0.2s var(--transition, ease), box-shadow 0.2s, background 0.2s;
}

.portal-btns a:hover {
  transform: translateY(-2px);
}

.portal-btn-primary {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  color: #fff !important;
  box-shadow: 0 10px 28px -8px rgba(37, 99, 235, 0.5);
  border: none;
}

.portal-btn-primary:hover {
  box-shadow: 0 14px 32px -6px rgba(37, 99, 235, 0.55);
}

.portal-btn-soft {
  background: rgba(37, 99, 235, 0.08);
  color: var(--p-blue-deep) !important;
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.portal-btn-soft:hover {
  background: rgba(37, 99, 235, 0.12);
}

[data-theme="dark"] .portal-btn-soft {
  color: #93c5fd !important;
}

.portal-btn-outline {
  background: transparent;
  color: var(--p-ink-soft) !important;
  border: 1.5px solid var(--p-line);
}

.portal-btn-outline:hover {
  border-color: var(--p-blue);
  color: var(--p-blue) !important;
}

.portal-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 24px 0 0;
  text-align: left;
}

.portal-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--p-ink-soft);
  background: var(--p-surface-2);
  border-radius: 12px;
  border: 1px solid var(--p-line);
}

.portal-feature span {
  font-size: 15px;
}

.portal-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--p-line);
  font-size: 12px;
  color: var(--p-muted);
  line-height: 1.55;
}

.portal-note a {
  color: var(--p-blue);
  font-weight: 600;
  text-decoration: none;
}

.portal-note a:hover {
  text-decoration: underline;
}

/* ---------- AUTH (login / daftar) ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 40px;
  font-family: var(--p-font);
  background:
    radial-gradient(ellipse 70% 45% at 15% 0%, rgba(37, 99, 235, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 35% at 95% 5%, rgba(225, 29, 72, 0.08), transparent 45%),
    var(--p-bg);
  position: relative;
}

.auth-topbar {
  width: 100%;
  max-width: 440px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 2;
}

.auth-topbar a {
  font-size: 13px;
  font-weight: 600;
  color: var(--p-ink-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s;
}

.auth-topbar a:hover {
  color: var(--p-blue);
  background: rgba(37, 99, 235, 0.06);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: var(--p-shadow-lg);
  z-index: 2;
}

.auth-card.wide {
  max-width: 560px;
}

[data-theme="dark"] .auth-card {
  background: rgba(17, 24, 39, 0.92);
  border-color: rgba(71, 85, 105, 0.45);
}

.auth-head {
  text-align: center;
  margin-bottom: 24px;
}

.auth-head img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 14px;
  padding: 10px;
  background: linear-gradient(145deg, #eff6ff, #fff1f2);
  border-radius: 16px;
  border: 1px solid var(--p-line);
}

.auth-head h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--p-ink);
  margin: 0 0 6px;
}

.auth-head p {
  font-size: 13.5px;
  color: var(--p-muted);
  margin: 0;
  line-height: 1.5;
}

.auth-privacy-box {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--p-ink-soft);
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(255, 241, 242, 0.5));
  border: 1px solid rgba(37, 99, 235, 0.12);
}

[data-theme="dark"] .auth-privacy-box {
  background: rgba(30, 58, 138, 0.2);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--p-ink-soft);
}

.auth-privacy-box a {
  color: var(--p-blue);
  font-weight: 600;
}

.auth-msg {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  margin-bottom: 16px;
  display: none;
}

.auth-msg.show {
  display: block;
}

.auth-msg.error {
  background: rgba(225, 29, 72, 0.08);
  color: #be123c;
  border: 1px solid rgba(225, 29, 72, 0.2);
}

.auth-msg.success {
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--p-ink);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--p-line);
  border-radius: 12px;
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  background: var(--p-surface-2);
  color: var(--p-ink);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-control:focus {
  background: var(--p-surface);
  border-color: var(--p-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-control::placeholder {
  color: #94a3b8;
}

.btn-submit {
  width: 100%;
  margin-top: 6px;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #2563eb 60%, #3b82f6);
  box-shadow: 0 10px 24px -6px rgba(37, 99, 235, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -6px rgba(37, 99, 235, 0.5);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-footer-note {
  text-align: center;
  font-size: 13px;
  color: var(--p-muted);
  margin-top: 20px;
}

.auth-footer-note a {
  color: var(--p-blue);
  font-weight: 700;
  text-decoration: none;
}

.auth-footer-note a:hover {
  text-decoration: underline;
}

.auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

@media (max-width: 520px) {
  .auth-grid-2 {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 28px 22px;
  }
  .portal-landing-card {
    padding: 32px 24px;
  }
  .portal-features {
    grid-template-columns: 1fr;
  }
}

/* ---------- DASHBOARD PORTAL POLISH ---------- */
.mhs-portal-body {
  font-family: var(--p-font);
  background: var(--p-bg) !important;
}

.mhs-sidebar {
  background: var(--p-surface) !important;
  border-right: 1px solid var(--p-line) !important;
  box-shadow: 4px 0 24px -12px rgba(15, 23, 42, 0.06);
}

.mhs-brand b {
  letter-spacing: -0.02em;
}

.mhs-user-chip {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 241, 242, 0.6)) !important;
  border: 1px solid rgba(37, 99, 235, 0.1) !important;
  border-radius: 16px !important;
}

.mhs-nav-item {
  border-radius: 12px !important;
  font-weight: 600 !important;
  transition: background 0.15s, color 0.15s, transform 0.15s !important;
}

.mhs-nav-item:hover {
  transform: translateX(2px);
}

.mhs-nav-item.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(30, 58, 138, 0.06)) !important;
  color: var(--p-blue-deep) !important;
  box-shadow: inset 3px 0 0 var(--p-blue);
}

.mhs-main {
  background: transparent;
}

.mhs-page-title {
  letter-spacing: -0.03em !important;
  font-size: 26px !important;
}

.mhs-welcome-banner {
  border-radius: 20px !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(225, 29, 72, 0.04)) !important;
  border: 1px solid rgba(37, 99, 235, 0.1) !important;
  box-shadow: var(--p-shadow);
}

.mhs-stat-card,
.mhs-quick-btn,
.dash-card {
  border-radius: 16px !important;
  border: 1px solid var(--p-line) !important;
  box-shadow: var(--p-shadow) !important;
  background: var(--p-surface) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.mhs-quick-btn:hover,
.mhs-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--p-shadow-lg) !important;
}

.mhs-stat-ic {
  border-radius: 14px !important;
}

.dash-card h3 {
  letter-spacing: -0.02em;
  font-size: 16px !important;
}

.mhs-teman-card,
.mhs-kegiatan-card,
.mhs-link-card,
.mhs-jadwal-item,
.mhs-agenda-item,
.mhs-kesan-item {
  border-radius: 14px !important;
  transition: transform 0.15s, box-shadow 0.15s;
}

.mhs-teman-card:hover,
.mhs-link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.12);
}

.btn-dash-outline {
  border-radius: 12px !important;
  font-weight: 600 !important;
}

.mhs-mobile-top {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .mhs-mobile-top {
  background: rgba(15, 23, 42, 0.9) !important;
}

/* Soft animation on load */
@keyframes portalFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.portal-landing-card,
.auth-card {
  animation: portalFadeUp 0.45s var(--transition, ease) both;
}

.mhs-section.active {
  animation: portalFadeUp 0.3s ease both;
}

/* Theme toggle on portal */
.portal-topbar .theme-toggle-btn,
.auth-topbar .theme-toggle-btn {
  border: 1px solid var(--p-line);
  background: rgba(255,255,255,.7);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--p-ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
  font-family: inherit;
}
[data-theme="dark"] .portal-topbar .theme-toggle-btn,
[data-theme="dark"] .auth-topbar .theme-toggle-btn {
  background: rgba(17,24,39,.7);
  color: var(--p-muted);
}

/* Fix: loader logo never oversized */
.site-loader {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
}
.site-loader.hide {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.site-loader-logo {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  object-fit: contain !important;
}
.mhs-brand img {
  width: 36px !important;
  height: 36px !important;
  object-fit: contain !important;
}

/* ---------- Jadwal per prodi ---------- */
.mhs-jadwal-hint {
  font-size: 13px;
  color: var(--p-muted, #64748b);
  margin: 4px 0 14px;
  line-height: 1.45;
}
.mhs-jadwal-hint b { color: var(--p-ink, #0f172a); font-weight: 700; }

.mhs-jadwal-class {
  border: 1px solid var(--p-line, #e2e8f0);
  border-radius: 16px;
  background: var(--p-surface, #fff);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--p-shadow, 0 2px 8px rgba(15,23,42,.04));
}
.mhs-jadwal-class-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--p-line, #e2e8f0);
}
.mhs-jadwal-class-title {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--p-ink, #0f172a);
  margin-bottom: 4px;
}
.mhs-jadwal-kode {
  font-size: 11.5px;
  background: rgba(37,99,235,.08);
  color: var(--p-blue, #2563eb);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.mhs-jadwal-class-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mhs-jadwal-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(37,99,235,.1);
  color: #1e3a8a;
}
.mhs-jadwal-badge.soft {
  background: rgba(100,116,139,.1);
  color: #475569;
}
.mhs-jadwal-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mhs-jadwal-slot {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(248,250,252,.95);
  border: 1px solid rgba(226,232,240,.8);
}
.mhs-jadwal-slot-day {
  min-width: 72px;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #0f766e, #14b8a6);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
  line-height: 1.25;
}
.mhs-jadwal-slot-body {
  flex: 1;
  min-width: 0;
}
.mhs-jadwal-slot-body b {
  display: block;
  font-size: 13.5px;
  color: var(--p-ink, #0f172a);
  margin-bottom: 2px;
}
.mhs-jadwal-slot-body span {
  display: block;
  font-size: 12px;
  color: var(--p-muted, #64748b);
  line-height: 1.4;
}
.mhs-jadwal-dosen { margin-top: 2px !important; }

[data-theme="dark"] .mhs-jadwal-class {
  background: rgba(17,24,39,.85);
  border-color: #1e293b;
}
[data-theme="dark"] .mhs-jadwal-slot {
  background: rgba(15,23,42,.6);
  border-color: #1e293b;
}
[data-theme="dark"] .mhs-jadwal-badge {
  background: rgba(59,130,246,.2);
  color: #93c5fd;
}
[data-theme="dark"] .mhs-jadwal-badge.soft {
  background: rgba(148,163,184,.15);
  color: #94a3b8;
}

/* ---------- Karyawan slots (label panjang) + mobile fix ---------- */
.mhs-jadwal-slot.slot-karyawan {
  flex-direction: column;
  gap: 8px;
}
.mhs-jadwal-slot.slot-karyawan .mhs-jadwal-slot-day {
  min-width: 0;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f766e, #0d9488);
}
.mhs-jadwal-slot-day .day-main {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
}
.mhs-jadwal-slot-day .day-sub {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  line-height: 1.35;
  word-break: break-word;
}
.mhs-jadwal-slot.slot-karyawan .mhs-jadwal-slot-body {
  width: 100%;
  padding: 0 2px;
}
.mhs-jadwal-tgl {
  margin-top: 2px !important;
  font-size: 11.5px !important;
}

/* Mobile: filter row stack, class head stack, prevent overflow */
@media (max-width: 640px) {
  .mhs-filter-row {
    width: 100%;
    flex-direction: column;
    align-items: stretch !important;
  }
  .mhs-filter-row .mhs-select-sm,
  .mhs-filter-row .form-control {
    width: 100% !important;
    min-width: 0 !important;
  }
  .mhs-jadwal-class {
    padding: 14px 12px;
  }
  .mhs-jadwal-class-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .mhs-jadwal-class-title {
    font-size: 14px;
    word-break: break-word;
  }
  .mhs-jadwal-kode {
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
    margin-top: 4px;
  }
  /* Reguler di HP: day badge tetap kiri, jangan overflow */
  .mhs-jadwal-slot:not(.slot-karyawan) {
    gap: 10px;
  }
  .mhs-jadwal-slot:not(.slot-karyawan) .mhs-jadwal-slot-day {
    min-width: 56px;
    max-width: 64px;
    font-size: 11px;
    padding: 8px 4px;
  }
  .mhs-jadwal-slot-body b {
    font-size: 13px;
    word-break: break-word;
  }
  .mhs-section-head-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ============================================================
   PROFESSIONAL UPGRADE v2 — Bottom nav, skeleton, progress, polish
   ============================================================ */

/* ---------- Progress ring (profil completeness) ---------- */
.mhs-progress-ring {
  --pct: 0;
  --size: 52px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(
    var(--p-blue, #2563eb) calc(var(--pct) * 1%),
    rgba(148, 163, 184, 0.25) 0
  );
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}
.mhs-progress-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--p-surface, #fff);
}
.mhs-progress-ring span {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
  color: var(--p-ink, #0f172a);
}
[data-theme="dark"] .mhs-progress-ring::before {
  background: var(--p-surface, #111827);
}

/* ---------- Skeleton loading ---------- */
.mhs-skeleton {
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.12) 25%,
    rgba(148, 163, 184, 0.22) 50%,
    rgba(148, 163, 184, 0.12) 75%
  );
  background-size: 200% 100%;
  animation: mhsSkel 1.2s ease-in-out infinite;
  border-radius: 12px;
}
@keyframes mhsSkel {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.mhs-skel-card {
  height: 88px;
  margin-bottom: 12px;
}
.mhs-skel-line {
  height: 14px;
  margin-bottom: 8px;
}
.mhs-skel-line.short { width: 40%; }
.mhs-skel-line.mid { width: 70%; }

/* ---------- Empty state profesional ---------- */
.mhs-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--p-muted, #64748b);
}
.mhs-empty-ic {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.1), rgba(225, 29, 72, 0.08));
  display: grid;
  place-items: center;
  font-size: 28px;
}
.mhs-empty b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--p-ink, #0f172a);
  margin-bottom: 6px;
}
.mhs-empty p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 14px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.mhs-empty .btn-dash-outline,
.mhs-empty .btn-submit {
  margin-top: 4px;
}

/* ---------- Stat cards enhanced ---------- */
.mhs-stat-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mhs-stat-card::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08), transparent 70%);
  pointer-events: none;
}
.mhs-stat-card .mhs-stat-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--p-ink, #0f172a);
  line-height: 1.1;
}
.mhs-stat-card .mhs-stat-label {
  font-size: 12px;
  color: var(--p-muted, #64748b);
  font-weight: 500;
}

/* ---------- Welcome banner polish ---------- */
.mhs-welcome-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  color: #fff;
  border-radius: 20px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px -8px rgba(37, 99, 235, 0.35);
}
.mhs-welcome-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 90% 20%, rgba(255,255,255,0.15), transparent),
    radial-gradient(ellipse 40% 60% at 10% 90%, rgba(225, 29, 72, 0.2), transparent);
  pointer-events: none;
}
.mhs-welcome-banner h2 {
  color: #fff !important;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 6px;
  position: relative;
}
.mhs-welcome-banner p {
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 13.5px;
  margin: 0;
  position: relative;
  max-width: 520px;
  line-height: 1.5;
}
.mhs-welcome-status {
  position: relative;
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
  backdrop-filter: blur(8px);
}
.mhs-welcome-status .status-dot {
  background: #4ade80 !important;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3);
}

/* ---------- Bottom Navigation (mobile) ---------- */
.mhs-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--p-line, rgba(148, 163, 184, 0.35));
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 24px -4px rgba(15, 23, 42, 0.08);
}
[data-theme="dark"] .mhs-bottom-nav {
  background: rgba(17, 24, 39, 0.94);
  border-top-color: rgba(71, 85, 105, 0.5);
  box-shadow: 0 -4px 24px -4px rgba(0, 0, 0, 0.4);
}
.mhs-bottom-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  max-width: 480px;
  margin: 0 auto;
}
.mhs-bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border: none;
  background: transparent;
  color: var(--p-muted, #64748b);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 12px;
  transition: color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mhs-bnav-item .bnav-ic {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.15s;
}
.mhs-bnav-item.active {
  color: var(--p-blue, #2563eb);
  background: rgba(37, 99, 235, 0.08);
}
.mhs-bnav-item.active .bnav-ic {
  transform: scale(1.08);
}
.mhs-bnav-item:active {
  background: rgba(37, 99, 235, 0.12);
}
[data-theme="dark"] .mhs-bnav-item.active {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
}

/* Space for bottom nav on mobile */
@media (max-width: 900px) {
  .mhs-bottom-nav {
    display: block;
  }
  .mhs-portal {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  .mhs-main {
    padding-bottom: 24px;
  }
  /* Hide less-used sidebar items hint — bottom nav covers main 5 */
  .mhs-nav-item[data-section="tautan"],
  .mhs-nav-item[data-section="kesan"] {
    opacity: 0.85;
  }
}

/* ---------- View toggle (grid / list) ---------- */
.mhs-view-toggle {
  display: inline-flex;
  background: var(--p-surface-2, #f8fafc);
  border: 1px solid var(--p-line, #e2e8f0);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.mhs-view-toggle button {
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--p-muted, #64748b);
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.mhs-view-toggle button.active {
  background: var(--p-surface, #fff);
  color: var(--p-blue, #2563eb);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
[data-theme="dark"] .mhs-view-toggle {
  background: #0f172a;
  border-color: #1e293b;
}
[data-theme="dark"] .mhs-view-toggle button.active {
  background: #1e293b;
  color: #93c5fd;
}

/* Teman list view */
.mhs-teman-grid.is-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mhs-teman-grid.is-list .mhs-teman-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
}
.mhs-teman-grid.is-list .mhs-teman-foto {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.mhs-teman-grid.is-list .mhs-teman-info {
  flex: 1;
  min-width: 0;
}
.mhs-teman-grid.is-list .mhs-teman-bio {
  display: none;
}

/* ---------- Quick action chips on beranda ---------- */
.mhs-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
@media (max-width: 640px) {
  .mhs-quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.mhs-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 16px;
  border: 1px solid var(--p-line, #e2e8f0);
  background: var(--p-surface, #fff);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--p-ink, #0f172a);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.mhs-quick-btn span:first-child {
  font-size: 22px;
  line-height: 1;
}
.mhs-quick-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--p-shadow-lg);
  border-color: rgba(37, 99, 235, 0.3);
}

/* ---------- Section badge / chip ---------- */
.mhs-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.1);
  color: #1e40af;
}
.mhs-chip.warn {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}
.mhs-chip.ok {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}
[data-theme="dark"] .mhs-chip {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

/* ---------- Profil completeness bar ---------- */
.mhs-completeness {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--p-surface-2, #f8fafc);
  border: 1px solid var(--p-line, #e2e8f0);
  margin-bottom: 16px;
}
.mhs-completeness-text {
  flex: 1;
  min-width: 0;
}
.mhs-completeness-text b {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--p-ink, #0f172a);
  margin-bottom: 2px;
}
.mhs-completeness-text span {
  font-size: 12px;
  color: var(--p-muted, #64748b);
}
.mhs-completeness-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  margin-top: 8px;
  overflow: hidden;
}
.mhs-completeness-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  transition: width 0.4s ease;
}

/* ---------- Toast ---------- */
.mhs-toast-wrap {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(360px, calc(100vw - 32px));
}
@media (min-width: 901px) {
  .mhs-toast-wrap {
    bottom: 28px;
    left: auto;
    right: 28px;
    transform: none;
  }
}
.mhs-toast {
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: 14px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 12px 40px -8px rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: mhsToastIn 0.28s ease;
}
.mhs-toast.success { background: #166534; }
.mhs-toast.error { background: #991b1b; }
.mhs-toast.hide {
  animation: mhsToastOut 0.25s ease forwards;
}
@keyframes mhsToastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes mhsToastOut {
  to { opacity: 0; transform: translateY(8px); }
}

/* ---------- Pengumuman card ---------- */
.mhs-pengumuman-item {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--p-line, #e2e8f0);
  background: var(--p-surface, #fff);
  margin-bottom: 10px;
}
.mhs-pengumuman-item.pinned {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.5), var(--p-surface, #fff));
}
[data-theme="dark"] .mhs-pengumuman-item.pinned {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.25), var(--p-surface, #111827));
  border-color: rgba(245, 158, 11, 0.35);
}
.mhs-pengumuman-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.mhs-pengumuman-head b {
  font-size: 14px;
  font-weight: 700;
  color: var(--p-ink, #0f172a);
}
.mhs-pengumuman-item p {
  font-size: 13px;
  color: var(--p-ink-soft, #475569);
  line-height: 1.5;
  margin: 0;
}

/* ---------- Search bar polish ---------- */
.mhs-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}
.mhs-search-bar input[type="search"] {
  flex: 1;
  min-width: 160px;
}
.mhs-search-bar .mhs-select-sm {
  min-width: 140px;
}

/* ---------- Desktop: hide bottom nav, keep sidebar ---------- */
@media (min-width: 901px) {
  .mhs-bottom-nav {
    display: none !important;
  }
}
