/* Mobile-only header alignment: keep brand and actions on a single row. */
@media (max-width: 700px) {
  .headflex {
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 7px;
    min-height: 66px;
    padding: 8px 0;
  }
  .brand {
    order: 1;
    gap: 5px;
    min-width: 0;
    flex: 0 1 auto;
    max-width: 34%;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
  }
  .brand strong { font-size: 17px; white-space: nowrap; }
  .brand small { font-size: 8px; white-space: nowrap; }
  .menu-toggle {
    order: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 36px;
    padding: 0;
    margin: 0;
  }
  .head-actions {
    order: 2;
    margin-inline-start: auto;
    margin-right: 0;
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
  }
  .head-actions .header-icon {
    width: 34px;
    height: 36px;
    min-width: 34px;
    border-radius: 10px;
  }
  .head-actions .header-icon svg { width: 19px; height: 19px; }
  .head-actions > .btn {
    padding: 7px 8px;
    font-size: 10px;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 1;
  }
}
@media (max-width: 380px) {
  .container { width: calc(100% - 20px); }
  .headflex { gap: 4px; }
  .brand { gap: 3px; max-width: 31%; }
  .brand-mark { width: 30px; height: 30px; flex-basis: 30px; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 7px; }
  .menu-toggle { flex-basis: 30px; width: 30px; }
  .head-actions { gap: 3px; }
  .head-actions .header-icon { width: 31px; min-width: 31px; height: 33px; }
  .head-actions > .btn { padding: 6px; font-size: 9px; }
}


/* Center the notification popup on mobile instead of letting it overflow to the right. */
@media (max-width: 700px) {
  .notification-wrap { position: static !important; }
  .notification-dropdown {
position: fixed !important;
        top: 65px;
        left: 38% !important;
        right: auto !important;
        width: min(340px, calc(100vw - 28px)) !important;
        max-width: calc(70vw - 28px) !important;
        box-sizing: border-box !important;
        transform: translateX(-50%);
        z-index: 10020 !important;
  }
  .notification-dropdown:before {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) rotate(45deg);
  }
}
