/* ==========================================================================
   PERPUSTAKAAN INSTITUT (IKKH-GARUT) - MAIN GLOBAL STYLESHEET
   Concept: Prestigious Major University / Enterprise Academic Institute
   Palette: Emerald Green (#09a89e), Royal Gold (#ffb830), Pure White (#ffffff)
   Layout: Full-Width Edge-to-Edge Architecture (Optimized for 1920px+ Screens)
   ========================================================================== */

:root {
  /* Primary Identity Colors (Tosca IKKH #09a89e) */
  --primary: #09a89e;
  --primary-hover: #078f86;
  --primary-dark: #078f86;
  --primary-darker: #067c74;
  --primary-light: #e6f7f6;
  --primary-rgb: 9, 168, 158;

  /* Accent Gold */
  --accent-gold: #ffb830;
  --accent-gold-hover: #e5a426;
  --accent-gold-light: #fff8eb;
  --accent-gold-rgb: 255, 184, 48;

  /* Surface & Neutrals */
  --bg-body: #ffffff;
  --bg-surface: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  
  /* High-Contrast Institutional Typography */
  --text-main: #0a192f;
  --text-body: #2d3748;
  --text-muted: #5a6a85;
  --text-light: #8896ab;
  --text-white: #ffffff;

  /* Fine Institutional Borders */
  --border-light: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-focus: rgba(9, 168, 158, 0.5);

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(10, 25, 47, 0.04);
  --shadow-sm: 0 2px 5px 0 rgba(10, 25, 47, 0.06);
  --shadow-md: 0 6px 16px -2px rgba(10, 25, 47, 0.08);
  --shadow-lg: 0 12px 28px -4px rgba(10, 25, 47, 0.1);
  --shadow-xl: 0 24px 48px -8px rgba(10, 25, 47, 0.12);
  --shadow-emerald: 0 10px 25px -3px rgba(9, 168, 158, 0.25);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);

  /* Rounded Corners */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Full-Width Layout Max Width (Supports 1920px Displays with Majestic Proportions) */
  --container-max: 1740px;
  --header-height: 66px;
  --topbar-height: 34px;
}

/* CSS Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Anti-Flash & Preload Transition Lock: Mencegah layout/menu bergeser saat pemuatan awal */
body.preload,
body.preload *:not(.floating-loader-backdrop):not(.floating-loader-backdrop *) {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -ms-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
  animation-duration: 0s !important;
  -webkit-animation-duration: 0s !important;
}

/* Pastikan animasi loader (spin dual ring, progress bar & dots) tetap berjalan aktif saat preload */
body.preload .floating-loader-backdrop,
body.preload .floating-loader-backdrop * {
  animation-duration: revert !important;
  -webkit-animation-duration: revert !important;
}

/* ================================================================
   FLOATING LOADER — 100% Transparent Backdrop (Tanpa Layar Putih)
   Backdrop sepenuhnya transparan tanpa layar putih / blur, sehingga
   konten halaman tetap terlihat jelas dan hanya kapsul loader & top bar
   yang melayang elegan di tengah layar persis seperti di Landing Page.
   ================================================================ */

.floating-loader-backdrop,
.dashboard-body .floating-loader-backdrop {
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
}

/* Saat initial load & refresh di dashboard: tampilkan hanya kapsul melayang */
.dashboard-body.preload .floating-loader-backdrop {
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
}

.dashboard-body.preload .floating-loader-backdrop .floating-loader-card {
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
  transition: none !important;
}

.dashboard-body.preload .floating-loader-backdrop .floating-top-bar {
  animation: progressRun 1.5s cubic-bezier(0.2, 0.8, 0.4, 1) infinite !important;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-body);
  background-color: var(--bg-body);
  line-height: 1.6;
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.portal-body {
  font-size: 13.6px;
  line-height: 1.55;
  --header-height: 66px;
  --topbar-height: 34px;
}

body.dashboard-body {
  display: block;
  min-height: 100vh;
}

/* Zero-Flicker & Zero Layout Shift Content Canvas */
#main-content {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  outline: none;
}

ul, ol {
  list-style: none;
}

/* Full-Width Edge-to-Edge Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Typography Helpers */
.font-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.025em;
}

.font-serif-accent {
  font-family: 'Lora', serif;
  font-style: italic;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.52rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: var(--transition-normal);
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-white);
  box-shadow: 0 4px 14px 0 rgba(9, 168, 158, 0.35);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(9, 168, 158, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  color: var(--text-white);
  transform: translateY(-2px);
}

.btn-gold {
  background-color: var(--accent-gold);
  color: #1a1608;
  font-weight: 700;
  box-shadow: 0 4px 14px 0 rgba(255, 184, 48, 0.35);
}

.btn-gold:hover {
  background-color: var(--accent-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(255, 184, 48, 0.45);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline-white:hover {
  background-color: var(--text-white);
  color: var(--primary-dark);
  border-color: var(--text-white);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.74rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.68rem 1.45rem;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.badge-gold {
  background-color: var(--accent-gold-light);
  color: #925c04;
  border: 1px solid rgba(255, 184, 48, 0.35);
}

/* Institutional Section Header */
.section-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 3.75rem auto;
}

.section-header .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--primary-light);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.875rem;
  border: 1px solid rgba(9, 168, 158, 0.2);
}

.section-header h2 {
  font-size: 2.375rem;
  line-height: 1.22;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ==========================================================================
   INSTITUTIONAL OFFICIAL TOP BAR
   ========================================================================== */
.institutional-topbar {
  background-color: #09a89e;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  height: var(--topbar-height);
  min-height: var(--topbar-height);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1010;
}

.topbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #ffffff;
}

.topbar-item svg {
  color: #ffffff;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.topbar-badge {
  background-color: var(--accent-gold);
  color: #1a1608;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  border: none;
  letter-spacing: 0.01em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.topbar-link {
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 600;
  transition: opacity var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.topbar-link:hover {
  color: #ffffff;
  opacity: 0.85;
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  min-height: var(--header-height);
  box-sizing: border-box;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: box-shadow var(--transition-normal);
}

.site-header.is-scrolled {
  box-shadow: 0 4px 20px -2px rgba(10, 25, 47, 0.08);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Brand / Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-icon-wrapper {
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(9, 168, 158, 0.35);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-icon-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background-color: var(--accent-gold);
}

/* Custom logo state: NO background, NO shadow, NO border, NO gold bar */
.brand-icon-wrapper.has-custom-logo {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 0 !important;
  overflow: visible !important;
  width: auto !important;
  height: 40px !important;
}

.brand-icon-wrapper.has-custom-logo::after {
  display: none !important;
}

.brand-logo-img {
  width: auto;
  height: 38px;
  max-width: 44px;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.brand-title span {
  color: var(--primary);
}

.brand-institute {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  margin-top: 1px;
  letter-spacing: 0.01em;
}

.brand-subtext {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Navigation Menu */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.46rem 0.8rem;
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--text-main);
  border-radius: 5px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
  letter-spacing: 0.01em;
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.nav-link.active {
  color: #0a192f;
  background-color: #ffb830;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(255, 184, 48, 0.35);
}

.nav-link.active svg.chevron-icon {
  color: #0a192f;
}

.nav-link svg.chevron-icon {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}

.nav-item:hover .nav-link svg.chevron-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Institutional Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 245px;
  background-color: #ffffff;
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 36px -4px rgba(10, 25, 47, 0.14), 0 4px 12px -2px rgba(10, 25, 47, 0.06);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--primary);
  padding: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition-normal), transform var(--transition-normal), visibility var(--transition-normal);
  z-index: 1020;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.80rem;
  font-weight: 600;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.dropdown-item .item-icon {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background-color: var(--bg-secondary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item.active {
  background-color: #fff8eb;
  color: #b45309;
}

.dropdown-item.active {
  border-left: 3px solid #ffb830;
  font-weight: 700;
}

.dropdown-item:hover .item-icon,
.dropdown-item.active .item-icon {
  background-color: #ffb830;
  color: #0a192f;
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-search-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.44rem 0.82rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.btn-search-trigger:hover {
  background-color: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 10px rgba(9, 168, 158, 0.15);
}

.btn-search-trigger kbd {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 3px;
  padding: 0.08rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-login {
  background-color: var(--primary);
  color: #ffffff;
  padding: 0.48rem 1.15rem;
  font-size: 0.80rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 4px 12px rgba(9, 168, 158, 0.35);
  transition: background-color var(--transition-normal), transform var(--transition-normal);
}

.btn-login:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(9, 168, 158, 0.45);
  color: #ffffff;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-light);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.mobile-nav-toggle:hover {
  background-color: var(--bg-secondary);
}

/* Mobile Navigation Drawer */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 25, 47, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-drawer-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  height: 100vh;
  background-color: #ffffff;
  z-index: 1050;
  box-shadow: -8px 0 28px rgba(10, 25, 47, 0.2);
  display: flex;
  flex-direction: column;
  transition: right var(--transition-smooth);
  overflow-y: auto;
}

.mobile-drawer.is-active {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-secondary);
}

.mobile-drawer-close {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
}

.mobile-drawer-close:hover {
  background-color: #ffffff;
  color: var(--text-main);
}

.mobile-drawer-content {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  border-radius: var(--radius-sm);
}

.mobile-nav-link:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.mobile-nav-link.active {
  background-color: #ffb830;
  color: #0a192f;
  font-weight: 800;
}

.mobile-submenu {
  display: none;
  padding-left: 1rem;
  margin-top: 0.25rem;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-submenu.is-open {
  display: flex;
}

.mobile-sub-link {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.84375rem;
  font-weight: 500;
  color: var(--text-body);
  border-radius: var(--radius-sm);
}

.mobile-sub-link:hover,
.mobile-sub-link.active {
  color: #b45309;
  background-color: #fff8eb;
}

.mobile-sub-link.active {
  border-left: 3px solid #ffb830;
  font-weight: 700;
}

.mobile-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   PAGE BANNER COMPONENT (FOR SUBPAGES)
   ========================================================================== */
.page-banner {
  background-color: #09a89e;
  background: #09a89e;
  color: #ffffff;
  padding: 4rem 0 3.5rem 0;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--accent-gold);
}

.page-banner-content {
  max-width: 900px;
  position: relative;
  z-index: 2;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.breadcrumb-nav a {
  color: #ffffff;
  transition: color var(--transition-fast);
}

.breadcrumb-nav a:hover {
  color: var(--accent-gold);
}

.page-banner-title,
.page-banner .page-banner-title,
h1.page-banner-title {
  color: #ffffff !important;
  font-size: 2.75rem;
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 0.875rem;
  letter-spacing: -0.02em;
}

.page-banner-desc,
.page-banner .page-banner-desc,
p.page-banner-desc {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.95) !important;
  line-height: 1.6;
}

/* ==========================================================================
   SEARCH MODAL
   ========================================================================== */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 25, 47, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6rem 1.5rem 2rem 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.search-modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.search-modal-card {
  width: 100%;
  max-width: 720px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(10, 25, 47, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transform: translateY(-20px) scale(0.98);
  transition: all var(--transition-smooth);
  border: 1px solid var(--border-light);
}

.search-modal-backdrop.is-active .search-modal-card {
  transform: translateY(0) scale(1);
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background-color: #ffffff;
}

.search-modal-header svg {
  color: var(--primary);
  flex-shrink: 0;
}

.search-modal-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
}

.search-modal-input::placeholder {
  color: var(--text-light);
}

.search-modal-close {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.search-modal-body {
  padding: 1.25rem 1.5rem;
  max-height: 420px;
  overflow-y: auto;
}

.search-tags-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.search-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.search-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.85rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.search-tag-chip:hover {
  background-color: #f0fdfa;
  color: #078f86;
  border-color: rgba(9, 168, 158, 0.4);
  transform: translateY(-1px);
}

.search-modal-scopes {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.25rem 0.65rem;
  background-color: #f8fafc;
  border-bottom: 1px solid #edf2f7;
  overflow-x: auto;
  scrollbar-width: none;
}

.search-modal-scopes::-webkit-scrollbar {
  display: none;
}

.search-scope-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.search-scope-btn:hover {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #f1f5f9;
}

.search-scope-btn.is-active {
  background: #078f86;
  border-color: #078f86;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(7, 143, 134, 0.25);
}

.search-modal-submit-icon {
  background: none;
  border: none;
  padding: 0;
  color: #078f86;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.search-modal-submit-icon:hover {
  transform: scale(1.1);
}

.search-modal-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f0fdfa;
  border: 1px solid #09a89e;
  color: #078f86;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.32rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-modal-submit-btn:hover {
  background: #078f86;
  color: #ffffff;
}

.search-modal-submit-btn kbd {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.85;
}

.search-modal-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-hints {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.search-hints kbd {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 1.5px 4px;
  border-radius: 4px;
  font-size: 0.68rem;
  color: #334155;
  font-family: inherit;
  font-weight: 600;
}

.hint-dot {
  color: #94a3b8;
}

.search-footer-brand {
  font-weight: 600;
  color: #078f86;
}

/* ==========================================================================
   INSTITUTIONAL FOOTER
   ========================================================================== */
.site-footer {
  background-color: #09a89e;
  color: #e6f7f6;
  padding-top: 5.5rem;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--accent-gold);
}

.footer-top {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.2fr 1.2fr;
  gap: 3.5rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-brand .brand-title {
  color: #ffffff;
}

.footer-brand p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  max-width: 440px;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  font-size: 0.875rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #ffffff;
}

.footer-contact-item svg {
  color: var(--accent-gold);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-column-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  letter-spacing: -0.01em;
}

.footer-column-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 28px;
  height: 3px;
  background-color: var(--accent-gold);
  border-radius: 2px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.8125rem;
}

.footer-link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.88);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: #ffffff;
  transform: translateX(4px);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.footer-bottom {
  padding: 1.875rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84375rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-social-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.footer-social-btn:hover {
  background-color: #ffffff;
  color: #09a89e;
  border-color: #ffffff;
  transform: translateY(-2px);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (GLOBAL)
   ========================================================================== */
@media (max-width: 1200px) {
  .main-nav {
    display: none;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 992px) {
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .header-actions {
    gap: 8px;
  }

  .btn-login {
    font-size: 0.76rem;
    padding: 0.42rem 0.85rem;
    letter-spacing: 0.02em;
  }

  .brand-title {
    font-size: 0.92rem;
  }

  .brand-institute {
    font-size: 0.68rem;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .footer-top {
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --topbar-height: auto;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* 1. Institutional Topbar Mobile */
  .institutional-topbar {
    padding: 0.35rem 0;
    font-size: 0.70rem;
  }

  .topbar-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
  }

  .topbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .topbar-left .topbar-item {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.70rem;
  }

  .topbar-badge {
    display: none; /* Hide badge on mobile to prevent crowding */
  }

  .topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 0.70rem;
  }

  /* 2. Site Header & Brand Layout Mobile */
  .site-header {
    height: var(--header-height);
  }

  .header-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .brand {
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
    text-decoration: none;
  }

  .brand-icon-wrapper {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  .brand-icon-wrapper img {
    height: 34px;
    width: auto;
    object-fit: contain;
  }

  .brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .brand-title {
    font-size: 0.90rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-institute {
    font-size: 0.65rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 165px;
    display: block;
  }

  /* 3. Header Action Icons (Sleek Compact Mobile Icons) */
  .header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  /* Sembunyikan tombol login panjang dari navbar mobile (sudah lengkap ada di dalam drawer) */
  .header-actions .btn-login {
    display: none !important;
  }

  /* Ubah search trigger menjadi tombol ikon bulat/kotak rapi */
  .btn-search-trigger {
    padding: 0;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-light);
    flex-shrink: 0;
  }

  .btn-search-trigger span,
  .btn-search-trigger kbd {
    display: none !important;
  }

  .btn-search-trigger svg {
    width: 17px;
    height: 17px;
    color: var(--text-muted);
  }

  /* Tombol Menu Hamburger */
  .mobile-nav-toggle {
    display: flex !important;
    width: 38px;
    height: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: #ffffff;
    color: var(--text-main);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .mobile-nav-toggle svg {
    width: 20px;
    height: 20px;
  }

  /* 4. Footer & General Subpage Overrides */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.85rem;
    text-align: center;
  }

  .page-banner-title {
    font-size: 1.65rem;
  }
}

@media (max-width: 480px) {
  .brand-institute {
    max-width: 130px;
  }

  .topbar-right span:not(.topbar-lang-pill-wrap) {
    display: none;
  }
}

/* ==========================================================================
   FLOATING PAGE NAVIGATION LOADER (ENTERPRISE ACRYLIC GLASS CAPSULE)
   ========================================================================== */
.floating-loader-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-loader-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Ultra-Thin Dynamic Top Progress Bar (Non-intrusive, Zero Flash) */
.floating-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-gold) 50%, #ffffff 100%);
  box-shadow: 0 0 12px rgba(9, 168, 158, 0.8), 0 0 6px rgba(255, 184, 48, 0.6);
  z-index: 100000;
  transition: width 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.floating-loader-backdrop.is-active .floating-top-bar {
  animation: progressRun 1.5s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
}

@keyframes progressRun {
  0% {
    width: 0%;
    left: 0;
  }
  50% {
    width: 70%;
    left: 15%;
  }
  100% {
    width: 100%;
    left: 100%;
  }
}

/* Floating Acrylic Glass Capsule (Pill) */
.floating-loader-card {
  display: inline-flex;
  align-items: center;
  gap: 1.15rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid rgba(9, 168, 158, 0.3);
  box-shadow: 0 16px 40px -8px rgba(10, 25, 47, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.9);
  border-radius: 9999px;
  padding: 0.85rem 1.85rem 0.85rem 1rem;
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  pointer-events: auto;
  user-select: none;
}

.floating-loader-backdrop.is-active .floating-loader-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Dual Ring Animated Spinner */
.floating-loader-icon-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.floating-spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--primary);
  border-right-color: var(--primary);
  animation: spinDual 0.9s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

.floating-spinner-ring.ring-secondary {
  inset: 4px;
  border-width: 2px;
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: var(--accent-gold);
  border-left-color: var(--accent-gold);
  animation: spinDualReverse 1.3s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

.floating-spinner-core {
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(9, 168, 158, 0.25);
}

@keyframes spinDual {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spinDualReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

/* Content Styling */
.floating-loader-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.floating-loader-title-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.floating-loader-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.015em;
}

.floating-loader-dots span {
  animation: dotPulse 1.4s infinite;
  opacity: 0;
  font-weight: 800;
  color: var(--primary);
}

.floating-loader-dots span:nth-child(1) { animation-delay: 0s; }
.floating-loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.floating-loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

.floating-loader-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* ==========================================================================
   PORTAL PUBLIK (LANDING PAGE & SUBPAGES) - 85% HIGH-DENSITY SCALE
   Concept: Academic High-Density Proportion (Serasi dengan Dashboard 85%)
   Isolasi Penuh: Khusus .portal-body, sama sekali tidak mencemari .dashboard-body
   ========================================================================== */
body.portal-body {
  font-size: 13.6px; /* 85% dari basis 16px */
  line-height: 1.55;
  --header-height: 66px;
  --topbar-height: 34px;
}

/* 4. Page Banner Subpages (Profil, Layanan, Panduan) */
.portal-body .page-banner {
  padding: 2.75rem 0 2.25rem 0;
}

.portal-body .breadcrumb-nav {
  font-size: 0.74rem;
  margin-bottom: 0.7rem;
  gap: 0.45rem;
}

.portal-body .page-banner-title,
.portal-body .page-banner .page-banner-title,
.portal-body h1.page-banner-title {
  font-size: 2.15rem !important;
  margin-bottom: 0.65rem;
  line-height: 1.2;
}

.portal-body .page-banner-desc,
.portal-body .page-banner .page-banner-desc,
.portal-body p.page-banner-desc {
  font-size: 0.92rem !important;
  line-height: 1.55;
  max-width: 760px;
}

/* 5. Institutional Footer Compact */
.portal-body .site-footer {
  padding-top: 3.5rem;
}

.portal-body .footer-top {
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.portal-body .footer-brand p {
  font-size: 0.80rem;
  line-height: 1.55;
  margin: 0.75rem 0 1.15rem;
}

.portal-body .footer-contact-list {
  gap: 0.6rem;
}

.portal-body .footer-contact-item {
  font-size: 0.78rem;
  gap: 0.6rem;
}

.portal-body .footer-contact-item svg {
  width: 15px;
  height: 15px;
}

.portal-body .footer-column-title {
  font-size: 0.88rem;
  margin-bottom: 1.1rem;
}

.portal-body .footer-links {
  gap: 0.4rem;
}

.portal-body .footer-link {
  font-size: 0.78rem;
  padding: 0.2rem 0;
}

.portal-body .footer-bottom {
  padding: 1.25rem 0;
  font-size: 0.75rem;
}

/* Responsive Mobile Override for Portal Body */
@media (max-width: 768px) {
  body.portal-body {
    --header-height: 60px;
    --topbar-height: auto;
  }
  .portal-body .page-banner-title,
  .portal-body .page-banner .page-banner-title,
  .portal-body h1.page-banner-title {
    font-size: 1.65rem !important;
  }
}


