/* ==========================================================================
   Top Header
   ========================================================================== */

.mw-header {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  height: var(--header-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  z-index: 1030;
  transition: left var(--transition);
}

.mw-app.is-collapsed .mw-header { left: var(--sidebar-width-collapsed); }

@media (max-width: 991.98px) {
  .mw-header { left: 0; padding: 0 14px; }
}

.mw-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.mw-burger {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}

@media (max-width: 991.98px) {
  .mw-burger { display: inline-flex; }
}

.mw-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mw-header-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.05rem;
  transition: background var(--transition), color var(--transition);
}

.mw-header-icon-btn:hover { background: var(--body-bg); color: var(--text); }

.mw-header-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--card-bg);
}

.mw-header-search {
  position: relative;
  width: 320px;
  max-width: 100%;
}

@media (max-width: 767.98px) {
  .mw-header-search { display: none; }
}

.mw-header-search input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--body-bg);
  border-radius: 999px;
  padding: 9px 14px 9px 38px;
  font-size: 0.85rem;
}

.mw-header-search input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.mw-header-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.85rem;
}

.mw-header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
}
.mw-header-profile:hover { background: var(--body-bg); }

.mw-header-profile .info { line-height: 1.2; text-align: right; }
.mw-header-profile .info strong { display: block; font-size: 0.82rem; }
.mw-header-profile .info span { font-size: 0.7rem; color: var(--muted); }

@media (max-width: 575.98px) {
  .mw-header-profile .info { display: none; }
}

/* Dropdown menus */
.mw-dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 220px;
}

.mw-dropdown-menu .dropdown-header-custom {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.mw-dropdown-menu .dropdown-item-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text);
}
.mw-dropdown-menu .dropdown-item-custom:hover { background: var(--body-bg); }
.mw-dropdown-menu .dropdown-item-custom i { width: 16px; color: var(--muted); }
.mw-dropdown-menu .dropdown-item-custom.text-danger i { color: var(--danger); }

.mw-notif-panel { width: 340px; padding: 0; }
.mw-notif-panel .notif-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mw-notif-panel .notif-head span { font-size: 0.75rem; color: var(--primary); font-weight: 500; }
.mw-notif-list { max-height: 340px; overflow-y: auto; }
.mw-notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.mw-notif-item:last-child { border-bottom: none; }
.mw-notif-item:hover { background: var(--body-bg); }
.mw-notif-item .ic {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 0.85rem;
}
.mw-notif-item .txt p { font-size: 0.83rem; margin-bottom: 2px; }
.mw-notif-item .txt span { font-size: 0.72rem; color: var(--muted); }
.mw-notif-panel .notif-foot {
  padding: 10px 16px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  border-top: 1px solid var(--border);
}
