/* ── Top bar: bell + avatar only (panels hidden until click) ── */
.in-notif-item.in-notif-broadcast {
  background: linear-gradient(90deg, rgba(93,87,158,.08), transparent);
  border-left: 3px solid var(--portal-accent, #5D579E);
}
.in-notif-item.in-notif-broadcast i { color: var(--portal-accent, #5D579E); }

.in-topbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  height: 100%;
  flex-shrink: 0;
}
.in-topbar-slot {
  position: relative;
  flex-shrink: 0;
}
.in-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1080;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(20,20,50,.15);
  min-width: 0;
}
.in-dropdown-panel.is-open {
  display: block;
}
.in-dropdown-panel[hidden] {
  display: none !important;
}
.in-topbar-btn,
.in-topbar-avatar {
  border: none;
  background: #f0eef6;
  padding: 0;
  cursor: pointer;
  position: relative;
  transition: background .15s, box-shadow .15s;
  flex-shrink: 0;
}
.in-topbar-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--portal-accent, #5D579E);
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.in-topbar-btn:hover,
.in-topbar-avatar:hover {
  background: #e8e5f2;
}
.in-topbar-btn:focus-visible,
.in-topbar-avatar:focus-visible {
  outline: 2px solid var(--portal-accent, #5D579E);
  outline-offset: 2px;
}
.in-topbar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  display: inline-flex;
}
.in-topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.in-topbar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: .6rem;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  background: #e74c3c;
  color: #fff;
  border-radius: 9px;
  border: 2px solid #fff;
  pointer-events: none;
}
.in-notif-panel {
  width: min(92vw, 340px);
  border: none;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}
.in-notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  background: #f8f7fc;
  border-bottom: 1px solid #eee;
}
.in-notif-list { max-height: 360px; overflow-y: auto; }
.in-notif-empty { padding: 1.25rem; margin: 0; color: #888; font-size: .9rem; text-align: center; }
.in-notif-item {
  display: flex;
  gap: .65rem;
  padding: .7rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f0f0f0;
}
.in-notif-item:hover { background: #faf9fd; }
.in-notif-item i { color: var(--portal-accent, #5D579E); font-size: 1.1rem; margin-top: 2px; }
.in-notif-item b { display: block; font-size: .88rem; }
.in-notif-item small { color: #888; font-size: .78rem; }
.in-account-panel {
  width: 230px;
  max-width: calc(100vw - 24px);
  padding: .5rem;
}
.in-account-user {
  display: flex;
  gap: .6rem;
  align-items: center;
  padding: .4rem .45rem .55rem;
}
.in-account-user img { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.in-account-user strong { display: block; font-size: .88rem; line-height: 1.2; color: #222; }
.in-account-user small { color: #888; font-size: .78rem; }
.in-account-divider {
  margin: .25rem .35rem;
  border: 0;
  border-top: 1px solid #eee;
  opacity: 1;
}
.in-account-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .55rem;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-size: .88rem;
}
.in-account-link:hover { background: #f5f4fa; color: #333; }
.in-account-link i { width: 1.1rem; opacity: .7; font-size: 1rem; }
.in-account-logout { color: #dc3545 !important; }
.in-account-logout:hover { background: #fff5f5 !important; }

/* Never show bootstrap dropdown bleed in topbar */
.in-topbar .dropdown-menu { display: none !important; }

/* Solid header — no bleed-through, dropdowns not clipped */
.pc-header {
  background: #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.06) !important;
  z-index: 1030 !important;
  overflow: visible !important;
}
.pc-header .header-wrapper {
  align-items: center;
  min-height: 74px;
  overflow: visible !important;
  width: 100%;
}
.pc-header .ms-auto {
  display: flex;
  align-items: center;
  overflow: visible !important;
  padding-right: .25rem;
  margin-left: auto !important;
}
.pc-header .pc-mob-drp { flex-shrink: 0; }

/* Finance receipt — icon only in table */
.finance-receipt-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e0dde8;
  background: #faf9fd;
  color: var(--portal-accent, #5D579E);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
}
.finance-receipt-btn:hover { background: #f0eef6; }
.finance-receipt-modal .modal-body { padding: 0; background: #111; }
.finance-receipt-modal img { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; }
.finance-receipt-modal iframe { width: 100%; height: 75vh; border: 0; }

/* Dashboard modes */
.dash-view-toggle .btn { border-radius: 999px; padding: .35rem 1rem; font-size: .85rem; }
.dash-modern .dash-stat-card {
  border: none;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff 0%, #faf9fd 100%);
  box-shadow: 0 4px 20px rgba(93,87,158,.08);
  transition: transform .15s;
}
.dash-modern .dash-stat-card:hover { transform: translateY(-2px); }
.dash-analytics .metric-tile {
  border-radius: 14px;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #eceaf3;
}
.dash-analytics .metric-tile .metric-val { font-size: 1.75rem; font-weight: 700; color: var(--portal-accent, #5D579E); }

/* Widget customize chips */
.dash-widget-pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.dash-widget-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: .4rem .85rem;
  font-size: .82rem;
  cursor: pointer;
  user-select: none;
  transition: all .15s;
  margin: 0;
}
.dash-widget-chip input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.dash-widget-chip.active {
  background: var(--portal-accent, #5D579E);
  border-color: var(--portal-accent, #5D579E);
  color: #fff;
}
.dash-widget-chip:not(.active):hover { border-color: var(--portal-accent, #5D579E); background: #faf9fd; }
.dash-widget-chip i { font-size: 1rem; opacity: .85; }

/* DataTables */
.in-dt-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; background: linear-gradient(135deg, #f8f7fc 0%, #f0eef8 100%); border: 1px solid #e8e6f0; border-radius: 12px; padding: .65rem .85rem; }
.in-dt-toolbar .dt-buttons { display: flex; flex-wrap: wrap; gap: .4rem !important; }
.in-dt-toolbar .dt-buttons .dt-btn { font-size: .78rem; padding: .4rem .75rem; border-radius: 999px; border: 1px solid #ddd; background: #fff; color: #444; font-weight: 500; }
table.dataTable.in-datatable thead th { background: linear-gradient(180deg, #f8f7fc 0%, #f0eef8 100%); border-bottom: 2px solid var(--portal-accent, #5D579E) !important; font-size: .82rem; }

.hub-feed-thumb { max-width: 100%; max-height: 280px; border-radius: 12px; cursor: zoom-in; }
.hub-ig-media .hub-feed-thumb { max-height: 480px; border-radius: 0; width: 100%; }

/* v13.2.4 cross-device portal polish */
@media (max-width: 991.98px) {
  .pc-container {
    padding-top: .5rem;
  }
  .pc-content {
    padding-left: .85rem !important;
    padding-right: .85rem !important;
  }
  .page-header h2 {
    font-size: 1.25rem;
  }
  .card {
    border-radius: 12px;
  }
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }
  .btn-group {
    flex-wrap: wrap;
  }
  .portal-search-wrap {
    min-width: 0 !important;
    max-width: min(100%, 220px) !important;
    flex: 1 1 auto;
  }
}

@media (max-width: 575.98px) {
  .pc-header .header-wrapper {
    gap: .35rem;
    flex-wrap: nowrap;
  }
  .portal-context-chip { display: none !important; }
  .page-header .d-flex {
    flex-direction: column;
    align-items: stretch !important;
  }
  .page-header .btn {
    width: 100%;
  }
  .modal-dialog {
    margin: .5rem;
  }
  .form-control, .form-select, .btn {
    font-size: 16px; /* prevent iOS zoom on focus */
  }
}

/* Friends page search row */
@media (max-width: 767.98px) {
  body.hub-page .page-header .page-block {
    flex-direction: column;
    align-items: stretch !important;
    gap: .5rem;
  }
}
