/* =========================================================
   USHS Unified App Header
   Applies to Admin, CSR, and Customer portals.
   Design: Logo/brand left, icon actions + user chip right.
   ========================================================= */

.ushs-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  height: 62px;
  display: flex;
  align-items: center;
  padding: 0 20px 0 16px;
  gap: 10px;
  background: oklch(0.16 0.04 260 / 0.96);
  border-bottom: 1px solid oklch(0.98 0.005 250 / 0.12);
  box-shadow: 0 4px 24px oklch(0 0 0 / 0.32);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

/* ---- Left: brand / menu toggle ---- */
.ushs-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  flex-shrink: 0;
}

.ushs-header__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: oklch(0.62 0.22 255 / 0.18);
  border: 1px solid oklch(0.62 0.22 255 / 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: oklch(0.62 0.22 255) !important;
  flex-shrink: 0;
}

.ushs-header__logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 6px;
}

.ushs-header__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.ushs-header__brand-name {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: oklch(0.98 0.005 250) !important;
  white-space: nowrap;
}

.ushs-header__brand-sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: oklch(0.72 0.02 260) !important;
  white-space: nowrap;
}

/* ---- Menu toggle button (for pages with sidebar) ---- */
.ushs-header__menu-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid oklch(0.98 0.005 250 / 0.12);
  background: oklch(0.98 0.005 250 / 0.07);
  color: oklch(0.98 0.005 250) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  flex-shrink: 0;
  font-size: 16px;
}

.ushs-header__menu-btn:hover {
  background: oklch(0.62 0.22 255 / 0.18) !important;
  border-color: oklch(0.62 0.22 255 / 0.45) !important;
  color: oklch(0.98 0.005 250) !important;
}

/* ---- Page title (center or after brand) ---- */
.ushs-header__title {
  flex: 1;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: oklch(0.98 0.005 250) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

/* ---- Right: actions ---- */
.ushs-header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Icon action buttons (bell, chat, etc.) */
.ushs-header__icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid oklch(0.98 0.005 250 / 0.12);
  background: oklch(0.98 0.005 250 / 0.07);
  color: oklch(0.98 0.005 250) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  text-decoration: none !important;
  font-size: 16px;
}

.ushs-header__icon-btn:hover {
  background: oklch(0.62 0.22 255 / 0.18) !important;
  border-color: oklch(0.62 0.22 255 / 0.45) !important;
  color: oklch(0.98 0.005 250) !important;
}

.ushs-header__icon-btn i,
.ushs-header__icon-btn svg {
  color: inherit !important;
}

/* Notification badge dot */
.ushs-header__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: oklch(0.62 0.24 27);
  color: #fff !important;
  font-size: 9px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
  border: 1.5px solid oklch(0.16 0.04 260);
}

/* ---- User chip ---- */
.ushs-header__user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border-radius: 10px;
  border: 1px solid oklch(0.98 0.005 250 / 0.12);
  background: oklch(0.98 0.005 250 / 0.07);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  text-decoration: none !important;
  color: oklch(0.98 0.005 250) !important;
  max-width: 220px;
}

.ushs-header__user:hover {
  background: oklch(0.62 0.22 255 / 0.14) !important;
  border-color: oklch(0.62 0.22 255 / 0.38) !important;
}

.ushs-header__avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: oklch(0.62 0.22 255 / 0.28);
  border: 1px solid oklch(0.62 0.22 255 / 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  color: oklch(0.98 0.005 250) !important;
  flex-shrink: 0;
}

.ushs-header__user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.ushs-header__user-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: oklch(0.98 0.005 250) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.ushs-header__user-role {
  font-size: 0.67rem;
  font-weight: 500;
  color: oklch(0.72 0.02 260) !important;
  white-space: nowrap;
}

.ushs-header__user-chevron {
  color: oklch(0.72 0.02 260) !important;
  font-size: 11px;
  flex-shrink: 0;
}

/* ---- Notification dropdown panel ---- */
.ushs-notif-panel {
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  padding: 0;
  background: oklch(0.20 0.04 260 / 0.98) !important;
  border: 1px solid oklch(0.98 0.005 250 / 0.15) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 60px oklch(0 0 0 / 0.40) !important;
  backdrop-filter: blur(20px) !important;
}

.ushs-notif-panel .dropdown-header {
  padding: 12px 16px;
  font-weight: 800;
  font-size: 0.85rem;
  color: oklch(0.98 0.005 250) !important;
  border-bottom: 1px solid oklch(0.98 0.005 250 / 0.10);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: oklch(0.98 0.005 250 / 0.04);
}

.ushs-notif-panel .notif-item {
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-bottom: 1px solid oklch(0.98 0.005 250 / 0.06);
  cursor: pointer;
  transition: background 0.15s;
  color: oklch(0.98 0.005 250) !important;
  text-decoration: none;
}

.ushs-notif-panel .notif-item:hover {
  background: oklch(0.62 0.22 255 / 0.10) !important;
}

.ushs-notif-panel .notif-item.unread {
  background: oklch(0.62 0.22 255 / 0.06) !important;
}

.ushs-notif-panel .notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}

.ushs-notif-panel .notif-body strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: oklch(0.98 0.005 250) !important;
  display: block;
}

.ushs-notif-panel .notif-body small {
  font-size: 0.72rem;
  color: oklch(0.72 0.02 260) !important;
}

/* ---- Back button variant ---- */
.ushs-header__back-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid oklch(0.98 0.005 250 / 0.18);
  background: oklch(0.98 0.005 250 / 0.09);
  color: oklch(0.98 0.005 250) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s;
  font-size: 15px;
}

.ushs-header__back-btn:hover {
  background: oklch(0.62 0.22 255 / 0.22) !important;
  color: oklch(0.98 0.005 250) !important;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .ushs-header {
    padding: 0 12px;
    gap: 8px;
  }

  .ushs-header__brand-sub,
  .ushs-header__user-info {
    display: none;
  }

  .ushs-header__user {
    padding: 5px;
    max-width: unset;
  }

  .ushs-header__title {
    font-size: 0.9rem;
  }
}
