/* DME Profile — Auto-Header-Widget (fixed oben rechts, theme-unabhaengig). */
.dmep-hw {
  --hw-bg: #0f161b; --hw-bg2: #161e25; --hw-border: #22292f; --hw-text: #ffffff;
  --hw-muted: #adb0bc; --hw-accent: #45f882; --hw-green: #45f882; --hw-red: #ff5050; --hw-blue: #4d8cff;
  position: fixed; top: 12px; right: 16px; z-index: 99998; font-family: inherit; line-height: 1.3;
}
.dmep-hw * { box-sizing: border-box; }

.dmep-hw-toggle, .dmep-hw-login {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: inherit;
  background: rgba(22,22,32,.82); backdrop-filter: blur(8px); border: 1px solid var(--hw-border);
  border-radius: 0; padding: 5px 12px 5px 5px; color: var(--hw-text); font-size: 14px; font-weight: 600;
  text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.35); transition: border-color .2s, background .2s;
}
.dmep-hw-toggle:hover, .dmep-hw-login:hover { border-color: var(--hw-accent); }
/* Login-Button im /guides/-Kachel-Stil: eckig, dunkel, gruener Rahmen + Glow, Mono. */
.dmep-hw-login {
  background:
    radial-gradient(ellipse at 22% 28%, rgba(69,248,130,.16) 0%, transparent 55%),
    linear-gradient(135deg, #16202a 0%, #0f161b 68%, #0b0e13 100%);
  color: #45f882; border: 1px solid #45f882; padding: 9px 18px; font-weight: 800;
  font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: 1.5px;
  box-shadow: 0 0 14px rgba(69,248,130,.22), inset 0 0 10px rgba(69,248,130,.07);
}
.dmep-hw-login:hover {
  color: #45f882; border-color: #45f882; filter: none;
  box-shadow: 0 0 20px rgba(69,248,130,.40), inset 0 0 12px rgba(69,248,130,.12);
}

.dmep-hw-ava { position: relative; width: 36px; height: 36px; flex-shrink: 0; border-radius: 0; overflow: visible; }
.dmep-hw-ava img { width: 36px; height: 36px; border-radius: 0; object-fit: cover; display: block; }
.dmep-hw-ava.lg, .dmep-hw-ava.lg img { width: 46px; height: 46px; border-radius: 0; }
.dmep-hw-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 0;
  background: var(--hw-accent); color: #0b0e13; font-weight: 800; }
.dmep-hw-ava.lg .dmep-hw-ph { border-radius: 0; font-size: 20px; }
.dmep-hw-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--hw-green); border: 2px solid var(--hw-bg); }

.dmep-hw-info { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; line-height: 1.05; min-width: 0; }
.dmep-hw-name { font-size: 14px; font-weight: 800; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmep-hw-tags { display: flex; gap: 4px; }
.dmep-hw-t { font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 0; background: rgba(255,255,255,.08); color: var(--hw-muted); white-space: nowrap; }
.dmep-hw-t.ok { color: var(--hw-green); background: rgba(69,248,130,.16); }
.dmep-hw-t.dev { color: var(--hw-accent); background: rgba(69,248,130,.16); }
.dmep-hw-t.off { color: var(--hw-red); background: rgba(255,80,80,.14); }
.dmep-hw-caret { color: var(--hw-muted); font-size: 11px; transition: transform .2s; align-self: center; }
.dmep-hw.open .dmep-hw-caret { transform: rotate(180deg); }

/* Menue */
.dmep-hw-menu {
  position: absolute; top: calc(100% + 8px); right: 0; width: 280px; max-width: 84vw;
  background: var(--hw-bg); border: 1px solid var(--hw-border); border-radius: 0; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.55); opacity: 0; transform: translateY(-6px) scale(.98);
  pointer-events: none; transition: opacity .18s, transform .18s;
}
.dmep-hw.open .dmep-hw-menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.dmep-hw-head { display: flex; align-items: center; gap: 12px; padding: 16px; background: linear-gradient(135deg, var(--hw-bg2), var(--hw-bg)); border-bottom: 1px solid var(--hw-border); }
.dmep-hw-head-main { min-width: 0; }
.dmep-hw-head-name { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 800; color: #fff; }
.dmep-hw-verified { color: var(--hw-accent); flex-shrink: 0; }
.dmep-hw-head-sub { font-size: 11px; color: var(--hw-muted); margin-top: 1px; }
.dmep-hw-badges { display: flex; gap: 5px; margin-top: 7px; }
.dmep-hw-badge { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 0; }
.dmep-hw-badge.ok { color: var(--hw-green); background: rgba(69,248,130,.14); }
.dmep-hw-badge.muted { color: var(--hw-muted); background: rgba(255,255,255,.05); }

.dmep-hw-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; color: var(--hw-text); text-decoration: none; transition: background .15s; }
.dmep-hw-item:hover { background: rgba(255,255,255,.04); color: var(--hw-text); }
.dmep-hw-item svg { color: var(--hw-accent); flex-shrink: 0; }
.dmep-hw-item span { display: flex; flex-direction: column; min-width: 0; }
.dmep-hw-item b { font-size: 13.5px; font-weight: 700; }
.dmep-hw-item small { font-size: 11px; color: var(--hw-muted); }
.dmep-hw-item.danger { color: var(--hw-red); }
.dmep-hw-item.danger svg { color: var(--hw-red); }
.dmep-hw-item.danger:hover { background: rgba(255,80,80,.1); }
.dmep-hw-sep { height: 1px; background: var(--hw-border); margin: 4px 0; }

/* In die Navigation eingebettet (Modus "menu") */
.dmep-hw-li { list-style: none !important; display: flex; align-items: center; margin: 0; }
.dmep-hw-li::before, .dmep-hw-li::marker { content: none !important; }
.dmep-hw.dmep-hw-inline { position: relative; top: auto; right: auto; z-index: 50; display: inline-flex; vertical-align: middle; align-self: center; }
/* Rechtsbuendig, wenn direkt in eine Header-Flex-Leiste eingesetzt (tg/mykd-Theme). */
.tgmenu__nav > .dmep-hw-inline, .tgmenu__wrap > .dmep-hw-inline,
.tgmenu__navbar-wrap > .dmep-hw-inline { margin-left: auto; }
/* Look wie die /guides/-Kacheln: dunkler gruen-getoenter Gradient + Glow. */
.dmep-hw-inline .dmep-hw-toggle {
  background:
    radial-gradient(ellipse at 22% 28%, rgba(69,248,130,.14) 0%, transparent 55%),
    linear-gradient(135deg, #16202a 0%, #0f161b 68%, #0b0e13 100%);
  border: 1px solid #22292f;
  box-shadow: 0 0 14px rgba(69,248,130,.20), inset 0 0 10px rgba(69,248,130,.06);
}
.dmep-hw-inline .dmep-hw-toggle:hover {
  border-color: #45f882;
  box-shadow: 0 0 18px rgba(69,248,130,.34), inset 0 0 12px rgba(69,248,130,.10);
}
.dmep-hw-inline .dmep-hw-name { color: #fff; }
.dmep-hw-menu { z-index: 99999; }

@media (max-width: 600px) {
  .dmep-hw-tags { display: none; }
  .dmep-hw:not(.dmep-hw-inline) { top: 8px; right: 10px; }
}
@media (max-width: 420px) {
  .dmep-hw-info { display: none; }
}
