/*! dimagaID shared header v1 — the parts ui-kit does not have; colors and sizes come from the kit tokens */
/* sticky on the element itself: the kit's sticky .app-header inside it has no room to stick */
dimaga-header { display: block; position: sticky; top: 0; z-index: 20; }
/* before the script runs: keep the header's place, hide the raw slot content */
dimaga-header:not(:defined) { min-height: 57px; border-bottom: 1px solid var(--border); background: var(--surface); }
dimaga-header:not(:defined) > * { display: none !important; }
dimaga-header[wide] .dh .inner { max-width: var(--wide, 1120px); }
.dh .inner { gap: var(--sp-2, 8px); }
.dh .brand { flex-shrink: 0; }
.dh-logo { display: inline-flex; }
.dh-logo:empty { display: none; }
.dh-logo > svg { width: 26px; height: 26px; }

.dh-nav { display: flex; align-items: center; gap: var(--sp-5, 20px); margin-left: var(--sp-5, 20px); font-size: var(--fs-sm, 14px); font-weight: 600; min-width: 0; }
.dh-nav > a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.dh-nav > a:hover { color: var(--text); text-decoration: none; }
.dh-nav > a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.dh-nav .icon { width: 16px; height: 16px; }
.dh .dh-burger-wrap { display: none; }
@media (max-width: 879px) {
  .dh-nav { display: none; }
  .dh .dh-burger-wrap { display: inline-flex; }
}

.dh-actions { display: inline-flex; align-items: center; gap: var(--sp-2, 8px); }
.dh-actions:empty { display: none; }
.dh-id { display: inline-flex; align-items: center; gap: 4px; }
.dh .btn .icon { width: 18px; height: 18px; }

.dh-anchor { position: relative; display: inline-flex; }
.dh-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: min(280px, calc(100vw - 24px)); max-width: min(320px, calc(100vw - 24px));
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-lg, 14px);
  box-shadow: var(--shadow-md, 0 8px 28px rgba(0, 0, 0, .18)); padding: 6px;
}
.dh-pop[hidden] { display: none; }
.dh-pop.menu > a, .dh-pop .menu > a, .dh-pop .menu > button { min-height: 42px; font-size: var(--fs-sm, 14px); gap: 10px; }
.dh-pop .menu .icon { width: 18px; height: 18px; color: var(--muted); }
.dh-pop .menu .danger .icon { color: inherit; }
.dh-pop.menu > a[aria-current="page"] { color: var(--accent); }

.dh-avatar { width: 34px; height: 34px; font-size: var(--fs-sm, 14px); margin-left: 4px; }
.dh-avatar[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--accent); }
.dh-skeleton { background: var(--surface-2); cursor: default; }
.dh-who { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; }
.dh-who-text { display: flex; flex-direction: column; min-width: 0; }
.dh-who-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-who-text small { color: var(--muted); font-size: var(--fs-xs, 12px); }
.dh-me .menu { border-top: 1px solid var(--border); padding-top: 4px; margin-top: 2px; }

