/*==================================================
NAVBAR
==================================================*/

.navbar {
  position: sticky;

  top: 0;

  z-index: 900;

  height: 80px;

  display: flex;

  align-items: center;

  gap: 20px;

  padding: 0 25px;

  background: rgba(255, 255, 255, 0.45);

  backdrop-filter: blur(20px);

  -webkit-backdrop-filter: blur(20px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar-start {
  display: flex;

  align-items: center;

  gap: 18px;

  flex: 1;

  min-width: 0;
}

.navbar-center {
  flex: 1;

  display: flex;

  justify-content: center;
}

.navbar-end {
  display: flex;

  align-items: center;

  gap: 18px;

  flex-shrink: 0;
}

.menu-toggle {
  width: 45px;

  height: 45px;

  border: none;

  border-radius: 14px;

  cursor: pointer;

  background: var(--gradient);

  color: white;

  box-shadow: var(--shadow-sm);

  transition: 0.3s;
}

.menu-toggle:hover {
  transform: rotate(90deg);
}

.page-title {
  display: flex;

  flex-direction: column;

  min-width: 0;
}

.page-title h2 {
  font-size: 24px;

  margin: 0;

  white-space: nowrap;
}

.breadcrumb {
  font-size: 12px;

  color: var(--text-light);
}

.search-box {
  width: 100%;

  max-width: 420px;

  position: relative;
}

.search-box input {
  width: 100%;

  height: 45px;

  border: none;

  border-radius: 30px;

  padding-left: 45px;

  background: white;

  box-shadow: var(--shadow-sm);
}

.search-box i {
  position: absolute;

  left: 18px;

  top: 50%;

  transform: translateY(-50%);

  color: #999;
}

.nav-icon {
  position: relative;

  width: 42px;

  height: 42px;

  border-radius: 50%;

  background: white;

  display: flex;

  justify-content: center;

  align-items: center;

  cursor: pointer;

  box-shadow: var(--shadow-sm);
}

.badge {
  position: absolute;

  top: -2px;

  right: -2px;

  width: 18px;

  height: 18px;

  border-radius: 50%;

  background: var(--primary);

  color: white;

  font-size: 10px;

  display: flex;

  justify-content: center;

  align-items: center;
}

.profile {
  position: relative;

  display: flex;

  align-items: center;

  gap: 12px;

  cursor: pointer;
}

.profile-photo {
  width: 45px;

  height: 45px;

  border-radius: 50%;
}

.profile-info {
  display: flex;

  flex-direction: column;
}

.profile-info small {
  color: var(--text-light);
}

.profile-dropdown {
  position: absolute;

  top: 65px;

  right: 0;

  width: 220px;

  background: white;

  border-radius: 18px;

  box-shadow: var(--shadow);

  overflow: hidden;

  opacity: 0;

  visibility: hidden;

  transform: translateY(10px);

  transition: 0.25s;
}

.profile-dropdown.show {
  opacity: 1;

  visibility: visible;

  transform: translateY(0);
}

.profile-dropdown a {
  display: flex;

  align-items: center;

  gap: 10px;

  padding: 14px 18px;
}

.profile-dropdown a:hover {
  background: #f4f4f4;
}

/*==================================================
MILESTONE 7 · NAVBAR USER & INSTITUTION CONTEXT
==================================================*/

.wahid-navbar-context {
  display: flex;
  max-width: 180px;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid rgba(61, 91, 136, 0.1);
  border-radius: 12px;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 600;
}

.wahid-navbar-context span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wahid-navbar-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  color: #fff;
  background: var(--gradient);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  font-weight: 700;
}

.wahid-profile-summary {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 15px 18px 10px;
}

.wahid-profile-summary strong {
  color: var(--text-dark);
  font-size: 12px;
}

.wahid-profile-summary small {
  color: var(--text-light);
  font-size: 9px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .wahid-navbar-context,
  .profile-info {
    display: none;
  }
}

/* Milestone 9 · Hotfix 140.2 — foto profil current-user */
.wahid-navbar-avatar {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.wahid-navbar-avatar > span {
  position: relative;
  z-index: 0;
}

.wahid-navbar-avatar > img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/*==================================================
TAHAP 144 · PUSAT NOTIFIKASI OPERASIONAL
==================================================*/

.wahid-navbar-notifications {
  position: relative;
  flex: 0 0 auto;
}

.wahid-notification-trigger {
  border: 1px solid rgba(16, 58, 103, 0.08);
  color: #123a68;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.wahid-notification-trigger:hover,
.wahid-notification-trigger[aria-expanded="true"] {
  color: #fff;
  background: linear-gradient(135deg, #0c315a 0%, #1e6bb8 100%);
  box-shadow: 0 12px 24px rgba(18, 74, 128, 0.22);
  transform: translateY(-1px);
}

.wahid-notification-trigger:focus-visible,
.wahid-notification-panel button:focus-visible,
.wahid-notification-item:focus-visible {
  outline: 3px solid rgba(44, 132, 219, 0.28);
  outline-offset: 2px;
}

.wahid-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #c92435 0%, #ef4a4a 100%);
  box-shadow: 0 5px 12px rgba(190, 32, 48, 0.3);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.wahid-notification-panel {
  position: absolute;
  top: calc(100% + 15px);
  right: -74px;
  z-index: 1080;
  width: min(430px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid rgba(18, 58, 104, 0.12);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 65px rgba(7, 37, 70, 0.24);
  transform-origin: top right;
  animation: wahidNotificationIn 0.18s ease-out;
}

.wahid-notification-panel::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 88px;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(18, 58, 104, 0.12);
  border-left: 1px solid rgba(18, 58, 104, 0.12);
  background: #fff;
  transform: rotate(45deg);
}

.wahid-notification-panel[hidden] {
  display: none;
}

.wahid-notification-panel__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 15px;
  border-bottom: 1px solid #e6edf5;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.wahid-notification-panel__header > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wahid-notification-panel__header small {
  color: #b47a08;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.wahid-notification-panel__header strong {
  color: #0d315b;
  font-size: 15px;
  line-height: 1.35;
}

.wahid-notification-mark-all,
.wahid-notification-panel__footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  color: #15518b;
  background: #eaf4ff;
  font: inherit;
  font-size: 9.5px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.wahid-notification-mark-all {
  min-height: 34px;
  padding: 7px 10px;
}

.wahid-notification-mark-all:hover:not(:disabled),
.wahid-notification-panel__footer button:hover:not(:disabled) {
  color: #fff;
  background: #175b99;
}

.wahid-notification-mark-all:disabled,
.wahid-notification-panel__footer button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.wahid-notification-panel__body {
  max-height: min(520px, calc(100vh - 190px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #a7bed5 transparent;
}

.wahid-notification-panel__body::-webkit-scrollbar {
  width: 7px;
}

.wahid-notification-panel__body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #a7bed5;
}

.wahid-notification-state {
  display: flex;
  min-height: 170px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  color: #687d93;
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
}

.wahid-notification-state i {
  color: #1b68ad;
  font-size: 20px;
}

.wahid-notification-state.is-error i {
  color: #c93645;
}

.wahid-notification-item {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 15px 18px;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  cursor: pointer;
  color: inherit;
  background: #fff;
  text-align: left;
  font: inherit;
  transition: background 0.18s ease;
}

.wahid-notification-item:hover {
  background: #f6faff;
}

.wahid-notification-item.is-unread {
  background: linear-gradient(90deg, rgba(224, 240, 255, 0.9) 0%, #fff 68%);
}

.wahid-notification-item.is-unread::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1c73bd;
  box-shadow: 0 0 0 4px rgba(28, 115, 189, 0.11);
}

.wahid-notification-item__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: #17568e;
  background: #eaf4ff;
  font-size: 14px;
}

.wahid-notification-item.is-success .wahid-notification-item__icon {
  color: #167342;
  background: #e7f7ed;
}

.wahid-notification-item.is-warning .wahid-notification-item__icon {
  color: #a26300;
  background: #fff3d8;
}

.wahid-notification-item.is-danger .wahid-notification-item__icon {
  color: #b62434;
  background: #ffeaed;
}

.wahid-notification-item.is-neutral .wahid-notification-item__icon {
  color: #405a73;
  background: #eef2f6;
}

.wahid-notification-item__content {
  min-width: 0;
}

.wahid-notification-item__content strong {
  display: block;
  margin-bottom: 4px;
  color: #0e315a;
  font-size: 11px;
  line-height: 1.45;
}

.wahid-notification-item__content p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #60758a;
  font-size: 9.5px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wahid-notification-item__meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
  padding-top: 1px;
  color: #8496a8;
  font-size: 8.5px;
  white-space: nowrap;
}

.wahid-notification-item__meta i {
  color: #1a609e;
  font-size: 10px;
}

.wahid-notification-panel__footer {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid #e7edf4;
  color: #75889a;
  background: #f8fafc;
  font-size: 9px;
}

.wahid-notification-panel__footer button {
  min-height: 30px;
  padding: 6px 10px;
}

@keyframes wahidNotificationIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 760px) {
  .wahid-notification-panel {
    position: fixed;
    top: 72px;
    right: 14px;
    left: 14px;
    width: auto;
  }

  .wahid-notification-panel::before {
    display: none;
  }

  .wahid-notification-mark-all span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wahid-notification-panel {
    animation: none;
  }

  .wahid-notification-trigger,
  .wahid-notification-item,
  .wahid-notification-mark-all,
  .wahid-notification-panel__footer button {
    transition: none;
  }
}
