.topbar-user {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 9999;
    background: var(--base-color);
    background-image: url(https://www.transparenttextures.com/patterns/checkered-light-emboss.png);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    overflow: visible; /* wichtig für Avatar Überstand */
}

/* =========================
   LEFT SIDE WRAPPER
   ========================= */

.topbar-left {
    display: flex;
    align-items: center;   /* NICHT flex-end */
    gap: 12px;
    flex-wrap: nowrap;
}

/* =========================
   AVATAR (hängt unten raus)
   ========================= */

.topbar-user-icon {
    position: relative;
    display: inline-block;
    margin-left: 15px;
    margin-right: 12px;
    transform: translateY(25%); /* WICHTIG: hierhin verschieben */
}

.topbar-user-icon img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--base-color);
    display: block;
}

/* Logout */
.linklogout {
	background: var(--accent-dust);
	width: 22px;
	color: var(--base-color) !important;
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translate(-50%, calc(50% - 6px));
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
	
	text-decoration: none !important;
}

/* =========================
   WELCOME DEKO (hinter Icon / rausstehend)
   ========================= */

.welcome-deco {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 1;
    margin-left: -10px;
}

.welcome-deco img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    opacity: 0.85;
    /* leicht hinter den Avatar legen */
    z-index: 1;
    position: relative;
    pointer-events: none;
}

/* =========================
   WELCOME (bleibt 1 Zeile!)
   ========================= */

.topbar-welcome,
.topbar-status {
    display: flex;
    align-items: center;   /* NICHT unten kleben */
    gap: 6px;
    white-space: nowrap;
}

/* =========================
   RIGHT SIDE (Icons rechts fix)
   ========================= */

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.topbar-right a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

/* =========================
   MENU
   ========================= */

.menu-trigger {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted-tone);
}

/* =========================
   PAGE OFFSET
   ========================= */

#topbar-container {
    padding-top: 60px;
}

/* =========================
   MENU
   ========================= */

.menu-trigger {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#menu-overlay {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(234,233,229,0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
}

#menu-overlay a {
    font-family: var(--font-body);
    font-size: 11px;
    text-decoration: none;
    color: #333;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* =========================
   POPUP
   ========================= */

.popup_content {
    width: min(800px, 90vw);
    max-height: 70vh;
    overflow: auto;
    padding: 40px 50px;
    background: #eae9e5;
    background-image: url(https://www.transparenttextures.com/patterns/paper-fibers.png);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    border: 30px solid transparent;
    border-image-source: var(--dark-background);
    border-image-slice: 60;
    border-image-repeat: stretch;
}

.popup-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.popup-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popup-column a {
    font-family: var(--font-body);
    text-decoration: none;
    color: var(--maincolor-text);
    font-size: 14px;
    letter-spacing: 0.05em;
    display: flex;
    gap: 10px;
    align-items: center;
    transition: 0.2s ease;
    line-height: 1.2;
}

.popup-column a span {
    font-family: var(--font-title);
    font-size: 11px;
    opacity: 0.6;
    width: 30px;
}

.popup-column a:hover {
    transform: translateX(5px);
    opacity: 0.7;
}

.popup-column a span {
    font-family: var(--font-title);
    font-size: 11px;
    opacity: 0.6;
    width: 30px;
}

.popup-heading {
    display: block;
    margin-bottom: 15px;
    font-family: var(--font-title);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #2b2b2b;
    position: relative;
    padding-bottom: 10px;
}

.popup-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 1px;
    background: rgba(43,43,43,0.3);
}

#panel .upper .popup-column a,
#panel .upper .popup-column a:link,
#panel .upper .popup-column a:visited,
#panel .upper .popup-column a:hover,
#panel .upper .popup-column a:active {
    color: var(--maincolor-text);
}