:root {
  --hrms-nav-bg: rgba(255, 255, 255, 0.96);
  --hrms-nav-border: #e5e7eb;
  --hrms-nav-text: #111827;
  --hrms-nav-muted: #6b7280;
  --hrms-nav-blue: #2563eb;
  --hrms-nav-dark: #1e3a8a;
  --hrms-nav-panel: #ffffff;
}

body.hrms-unified-nav-enabled > .nav:not(.hrms-mega-nav) {
  display: none !important;
}

.hrms-mega-nav {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--hrms-nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hrms-nav-border);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.hrms-nav-inner {
  max-width: 1560px;
  margin: 0 auto;
  min-height: 62px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.hrms-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 950;
  color: var(--hrms-nav-dark);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  margin-right: 8px;
}

.hrms-nav-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.hrms-nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.hrms-nav-logo-title {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.hrms-nav-logo-subtitle {
  font-size: 10px;
  color: var(--hrms-nav-muted);
  font-weight: 800;
}

.hrms-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.hrms-menu-item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 62px;
}

.hrms-menu-trigger {
  border: 0;
  background: transparent;
  color: #374151;
  font-weight: 850;
  font-size: 13px;
  padding: 10px 11px;
  border-radius: 10px;
  cursor: default;
}

.hrms-menu-item:hover .hrms-menu-trigger {
  background: #eff6ff;
  color: #1d4ed8;
}

.hrms-menu-panel {
  display: none;
  position: absolute;
  top: 56px;
  left: 0;
  width: 760px;
  background: var(--hrms-nav-panel);
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
  padding: 18px;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hrms-menu-item:hover .hrms-menu-panel {
  display: grid;
}

.hrms-menu-item:nth-last-child(-n+2) .hrms-menu-panel {
  left: auto;
  right: 0;
}

.hrms-menu-section {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 12px;
}

.hrms-menu-section-title {
  font-size: 12px;
  font-weight: 950;
  color: #0f172a;
  margin-bottom: 8px;
}

.hrms-menu-link {
  display: block;
  text-decoration: none;
  color: #374151;
  font-size: 12px;
  line-height: 1.35;
  padding: 8px 9px;
  border-radius: 9px;
  margin-bottom: 3px;
}

.hrms-menu-link:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.hrms-menu-link small {
  display: block;
  color: #6b7280;
  font-size: 10px;
  margin-top: 2px;
}

.hrms-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hrms-nav-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 9px;
  white-space: nowrap;
}

.hrms-nav-home {
  color: var(--hrms-nav-blue);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.hrms-nav-mobile-note {
  display: none;
  font-size: 11px;
  color: var(--hrms-nav-muted);
}

@media (max-width: 1120px) {
  .hrms-nav-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: 12px 16px;
  }

  .hrms-menu {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hrms-menu-panel {
    width: min(92vw, 760px);
    grid-template-columns: 1fr;
  }

  .hrms-nav-mobile-note {
    display: inline;
  }
}

.hrms-menu-link.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.hrms-menu-link.is-disabled:hover {
  background: #f3f4f6;
  color: #6b7280;
}
.hrms-menu-section-empty {
  color: #9ca3af;
  font-size: 12px;
  padding: 8px 9px;
}
.hrms-nav-pill.is-permission {
  background: #eff6ff;
  color: #1d4ed8;
}
