@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;600&display=swap');

/* ===========================================
   NAVBAR – Zentrale Quelle für alle Navbar-Styles
   Konsolidiert aus: premium-nav.css, wallet-navbar-widget.css, language-switcher.css
   Font: Figtree | 8pt Grid | Flat Design | Design Tokens
   =========================================== */

/* ===========================================
   NAVBAR BASE
   =========================================== */
/* B-1: Navbar aus dem Dokumentfluss herausnehmen (fixed statt sticky).
   Inhalt rückt nicht nach → body bekommt padding-top: 70px (s. u.)
   Vorteil: translateY(-100%) hinterlässt keine Lücke im Layout.       */
.nav,
.unified-navbar,
.lang-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 0 24px;
    height: 70px;
    background: var(--bg-surface);
    border-bottom: var(--border-thin) solid var(--border-default);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.10), 0 2px 4px rgba(0, 0, 0, 0.06);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    font-family: var(--font-family);
    transition: transform 0.28s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

/* Scroll-hide: JS adds this class on scroll-down */
.lang-nav.navbar-hidden,
.unified-navbar.navbar-hidden {
    transform: translateY(-100%);
}

/* Kompensation: nur wenn body tatsächlich eine fixed-Navbar enthält.
   :has() support: Chrome 105+, Firefox 121+, Safari 15.4+, Edge 105+ — OK für 2026.
   Seiten ohne Navbar (z. B. about-us.html, login.html) bleiben unberührt. */
body:has(.unified-navbar),
body:has(.lang-nav) {
    padding-top: 70px;
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* ===========================================
   LOGO
   =========================================== */
.nav-logo,
.unified-logo,
.lang-nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    transition: opacity var(--duration-fast) var(--easing-base);
}

.nav-logo:hover,
.unified-logo:hover,
.lang-nav-logo:hover {
    opacity: 0.8;
}

.unified-logo-icon,
.lang-nav-logo-icon {
    font-size: 20px;
    line-height: 1;
}

.unified-brand-name,
.lang-nav-brand-name {
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* ===========================================
   NAVIGATION LINKS
   =========================================== */
.nav-links,
.lang-nav-links,
.unified-nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.nav-link,
.lang-nav .lang-nav-link,
.lang-nav a.lang-nav-link,
.lang-nav button.lang-nav-link,
.unified-nav-link {
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0;
    /* display: inline-flex + align-items: center stellen sicher, dass height: 70px
       auch auf <a>-Elementen wirkt (inline ignoriert height).
       Ohne diese Angabe berechnet ::after bottom relativ zur ~20px Schrifthöhe
       statt zur 70px Navhöhe → Strich erscheint oberhalb des Textes. */
    display: inline-flex;
    align-items: center;
    line-height: 1;
    height: 70px;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: color var(--duration-fast) var(--easing-base);
    white-space: nowrap;
    position: relative;
}

.nav-link:hover,
.lang-nav .lang-nav-link:hover,
.unified-nav-link:hover {
    color: var(--text-primary);
}

.nav-link.is-active,
.lang-nav .lang-nav-link.is-active,
.lang-nav .lang-nav-link.active,
.unified-nav-link.active {
    color: var(--text-primary);
    font-weight: 700;
}

.nav-link.is-active::after,
.lang-nav .lang-nav-link.is-active::after,
.lang-nav .lang-nav-link.active::after,
.unified-nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 20px;   /* 70px Nav, ~14px Font, zentriert → Textunterkante ~28px vom Boden; Strich 8px darunter */
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.nav-link:focus-visible,
.unified-nav-link:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
}

/* Logout Link */
.lang-nav .lang-nav-link--logout {
    color: var(--text-muted);
}

.lang-nav .lang-nav-link--logout:hover {
    color: var(--text-primary);
}

/* Icon-only Links */
.lang-nav .lang-nav-link--icon {
    padding: 0 var(--space-2);
    display: inline-flex;
    align-items: center;
}

.lang-nav .lang-nav-link--icon svg {
    width: 18px;
    height: 18px;
}

/* Visibility States */
.lang-nav .lang-nav-link--visible svg {
    color: var(--success);
}

.lang-nav .lang-nav-link--hidden svg {
    color: var(--text-muted);
}

/* ===========================================
   NAVIGATION ACTIONS
   =========================================== */
.nav-actions,
.lang-nav-actions,
.unified-nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Messages button always last, regardless of DOM order */
#btn-messages {
    order: 9999;
}

/* Primary CTA Button */
.nav-cta {
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: var(--weight-semibold);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    border: var(--border-thin) solid var(--accent);
    background: var(--accent);
    color: var(--neutral-0);
    text-decoration: none;
    transition:
        background var(--duration-fast) var(--easing-base),
        border-color var(--duration-fast) var(--easing-base);
}

.nav-cta:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Secondary Link */
.nav-secondary {
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: var(--weight-regular);
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--easing-base);
}

.nav-secondary:hover {
    color: var(--text-primary);
}

/* Action Buttons */
.lang-nav .lang-nav-btn,
.lang-nav a.lang-nav-btn,
.lang-nav button.lang-nav-btn,
.unified-action-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    height: 40px;
    padding: 0 var(--space-4);
    background: var(--bg-surface);
    border: var(--border-thin) solid var(--border-strong);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--text-caption);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--easing-base);
}

.lang-nav .lang-nav-btn:hover,
.unified-action-item:hover {
    border-color: var(--text-muted);
}

/* Primary Action Button */
.lang-nav .lang-nav-btn.primary,
.unified-action-item.primary {
    background: var(--accent);
    color: var(--neutral-0);
    border-color: var(--accent);
}

.lang-nav .lang-nav-btn.primary:hover,
.unified-action-item.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Icon-only Action Button */
.lang-nav .lang-nav-btn--icon,
.unified-action-item.icon-only {
    width: 40px;
    padding: 0;
    justify-content: center;
    gap: 0;
}

/* Visibility Toggle Buttons */
.lang-nav .lang-nav-btn--visible {
    background: var(--success);
    border-color: var(--success);
    color: var(--neutral-0);
}

.lang-nav .lang-nav-btn--hidden {
    background: var(--text-muted);
    border-color: var(--text-muted);
    color: var(--neutral-0);
}

/* ===========================================
   DROPDOWN MENU
   =========================================== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: var(--weight-regular);
    color: var(--text-secondary);
}

.nav-dropdown-trigger:hover {
    color: var(--text-primary);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 200px;
    background: var(--bg-surface);
    border: var(--border-thin) solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-2);
    display: none;
    z-index: 100;
}

.nav-dropdown.is-active .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-item {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: var(--weight-regular);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition:
        background var(--duration-fast) var(--easing-base),
        color var(--duration-fast) var(--easing-base);
}

.nav-dropdown-item:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

/* ===========================================
   MOBILE NAVIGATION
   =========================================== */
.nav-mobile-toggle {
    display: none;
    padding: var(--space-2);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: var(--border-thin);
    background: var(--text-primary);
    margin: var(--space-1) 0;
    transition: var(--duration-base) var(--easing-base);
}

/* ===========================================
   NAVIGATION VARIANTS
   =========================================== */
.nav-transparent {
    background: transparent;
    border-bottom-color: transparent;
}

.nav-transparent .nav-link {
    color: var(--neutral-0);
}

.nav-transparent .nav-link:hover {
    color: var(--neutral-0);
    opacity: 0.8;
}

.nav-transparent .nav-logo {
    color: var(--neutral-0);
}

.nav-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ===========================================
   BREADCRUMB NAVIGATION
   =========================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) 0;
    list-style: none;
}

.breadcrumb-item {
    font-family: var(--font-family);
    font-size: var(--text-caption);
    font-weight: var(--weight-regular);
    color: var(--text-muted);
}

.breadcrumb-item:not(:last-child)::after {
    content: "/";
    margin-left: var(--space-2);
    color: var(--text-muted);
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--easing-base);
}

.breadcrumb-link:hover {
    color: var(--text-primary);
}

.breadcrumb-item.is-active {
    color: var(--text-primary);
}

/* ===========================================
   TIMEZONE & TIME CONTROLS
   =========================================== */
.lang-nav-time:not([hidden]) {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.lang-nav-time-select {
    font-family: var(--font-family);
    font-size: var(--text-caption);
    color: var(--text-primary);
    background: var(--bg-surface);
    border: var(--border-thin) solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 0 var(--space-3);
    height: 40px;
    cursor: pointer;
}

.lang-nav-time-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

/* Override #sidebar button { width:100%; border:1px solid } from combined-all.css */
#sidebar .tz-clock-btn {
    width: 14px;
    max-width: 14px;
    height: 14px;
    min-width: 0;
    min-height: 0;
    flex: 0 0 14px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
    color: var(--text-muted);
    align-self: center;
    line-height: 0;
}

.tz-clock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    max-width: 14px;
    height: 14px;
    min-width: 0;
    min-height: 0;
    flex: 0 0 14px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    color: var(--text-muted);
    align-self: center;
    line-height: 0;
    transition: color var(--duration-fast) var(--easing-base);
}

.tz-clock-btn:hover {
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.tz-clock-btn.is-open {
    color: var(--accent);
}

.tz-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 220ms var(--easing-base);
}

.tz-panel.is-open {
    max-height: 120px;
}

.tz-panel-inner {
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
    background: var(--bg-subtle);
    border-top: var(--border-thin) solid var(--border-default);
    font-size: var(--text-caption);
}

.tz-panel-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}

.tz-panel-row:last-child {
    margin-bottom: 0;
}

.tz-panel-label {
    color: var(--text-muted);
    font-weight: var(--weight-semibold);
    min-width: 64px;
    flex-shrink: 0;
}

.tz-panel-value {
    color: var(--text-primary);
    font-weight: var(--weight-regular);
}

/* Drawer Wallet-Slot — Wallet-Widget wird auf Mobile per JS hier hingemoved */
.navbar-drawer-wallet {
    flex-shrink: 0;
    padding: 8px 16px 12px;
    border-top: 1px solid var(--border-subtle);  /* S113: semantic token */
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.navbar-drawer-wallet:empty {
    display: none;
}
.navbar-drawer-wallet #wallet-navbar-container {
    display: block !important;
    width: 100%;
    position: relative;
}
.navbar-drawer-wallet .wallet-navbar-widget {
    width: 100%;
    position: relative;
}
.navbar-drawer-wallet .wallet-button {
    width: 100%;
    justify-content: space-between;
    padding: 12px 14px;
    min-height: 48px;
    border-radius: 12px;
}
/* Panel inline statt Dropdown/Bottom-Sheet — wird vom Drawer-Body
   gescrollt, keine z-index-Kollision mehr */
.navbar-drawer-wallet .wallet-panel {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transform: none !important;
    bottom: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
}
.navbar-drawer-wallet .wallet-panel.hidden {
    display: none !important;
}

/* Drawer settings section — language + timezone, matches module .navbar-dropdown-settings */
.navbar-dropdown-settings {
    border-top: 1px solid var(--neutral-100);
    padding: 4px 24px 12px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.navbar-drawer-setting-wrap {
    position: relative;
}

.navbar-drawer-plain-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 8px 0;
    color: var(--text-primary);  /* S113: align with .navbar-drawer-link — consistent font color */
    font-family: 'Figtree', system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    width: 100%;
    text-align: left;
}

.navbar-drawer-plain-btn--static {
    cursor: default;
}

.navbar-drawer-plain-chevron {
    opacity: 0.4;
    transition: transform 150ms ease;
    margin-left: auto;
    flex-shrink: 0;
}

.navbar-drawer-plain-btn[aria-expanded="true"] .navbar-drawer-plain-chevron {
    transform: rotate(180deg);
}

.navbar-drawer-plain-lang-label,
.navbar-drawer-plain-currency-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.navbar-drawer-select-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 4px);
    max-height: 220px;
    overflow-y: auto;
    z-index: 700;
}

.navbar-select-dropdown {
    background: var(--bg-surface);      /* S113: semantic token — dark-mode-aware */
    border: 1px solid var(--border-default);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(6, 15, 28, 0.14);
    overflow: hidden;
}

.navbar-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    background: none;
    border: none;
    font-family: 'Figtree', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.navbar-select-option:hover {
    background: var(--neutral-50);
}

.navbar-select-option.is-selected {
    background: var(--neutral-100);
    color: var(--color-900);
    font-weight: 600;
}

.navbar-select-flag {
    font-size: 15px;
}

.navbar-select-code {
    font-weight: 600;
    min-width: 28px;
}

.navbar-select-name {
    color: var(--text-muted);
    font-size: 11px;
}

.navbar-select-option + .navbar-select-option {
    border-top: 1px solid var(--neutral-100);
}

/* Drawer footer — logout with top separator */
.navbar-drawer-footer {
    border-top: 1px solid var(--border-default);  /* S113: semantic token */
    padding: 8px 0;
    flex-shrink: 0;
}

/* ===========================================
   CALENDAR WEEK NAVIGATION
   =========================================== */
.cal-week-nav {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

/* Legacy-Styling — wird umgangen wenn .button-standard-black gesetzt ist */
.cal-week-nav-btn:not(.button-standard-black) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--bg-surface);
    border: var(--border-thin) solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: all var(--duration-fast) var(--easing-base);
}

.cal-week-nav-btn:not(.button-standard-black):hover {
    background: var(--bg-subtle);
    border-color: var(--text-muted);
}

.cal-week-nav-btn:not(.button-standard-black):focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* ===========================================
   WALLET NAVBAR WIDGET
   =========================================== */
.wallet-navbar-widget {
    position: relative;
    display: inline-block;
}

/* Wallet Button */
.wallet-navbar-widget .wallet-button {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-family);
    font-size: var(--text-caption);
    font-weight: 700;
    transition: background 120ms ease, transform var(--duration-fast) var(--easing-base), box-shadow var(--duration-fast) var(--easing-base);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.wallet-navbar-widget .wallet-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.wallet-navbar-widget .wallet-button:active,
.wallet-navbar-widget .wallet-button.active {
    background: var(--accent-hover);
    transform: translateY(0);
}

.wallet-navbar-widget .wallet-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.wallet-navbar-widget .wallet-balance {
    font-weight: 700;
    font-size: 16px;
    min-width: 60px;
    text-align: right;
}

.wallet-navbar-widget .wallet-chevron {
    width: 16px;
    height: 16px;
    transition: transform var(--duration-fast) var(--easing-base);
}

.wallet-navbar-widget .wallet-button.active .wallet-chevron {
    transform: rotate(180deg);
}

/* Balance Update Animation */
@keyframes balancePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: var(--success-hover);
        text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    }
}

.wallet-navbar-widget .balance-updated-animation {
    animation: balancePulse 0.6s ease;
}

/* Wallet Panel */
.wallet-navbar-widget .wallet-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 420px;
    max-width: calc(100vw - 32px);
    background: var(--bg-surface); /* dark-mode-aware */
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--duration-fast), transform var(--duration-fast);
}

.wallet-navbar-widget .wallet-panel.hidden {
    display: none;
}

/* Panel Header */
.wallet-navbar-widget .wallet-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--neutral-200);
}

.wallet-navbar-widget .wallet-panel-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.wallet-navbar-widget .close-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted); /* S114: neutral-600 → semantic token (dark-mode-aware) */
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all var(--duration-fast) var(--easing-base);
}

.wallet-navbar-widget .close-button:hover {
    background: var(--neutral-100);
    color: var(--text-primary);
}

.wallet-navbar-widget .close-button svg {
    width: 20px;
    height: 20px;
}

/* Panel Content */
.wallet-navbar-widget .wallet-panel-content {
    padding: 24px;
}

/* Balance Card */
.wallet-navbar-widget .balance-card {
    background: var(--accent);
    color: white;
    padding: 28px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.wallet-navbar-widget .balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin: 0 0 8px 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.wallet-navbar-widget .balance-amount {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.wallet-navbar-widget .balance-updated {
    font-size: 13px;
    opacity: 0.85;
    margin: 0;
}

/* Pending/Escrow breakdown in navbar panel */
.wallet-navbar-widget .balance-breakdown {
    display: none;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
}

.wallet-navbar-widget .balance-breakdown.has-pending {
    display: flex;
}

.wallet-navbar-widget .balance-breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255,255,255,0.9);
}

.wallet-navbar-widget .balance-breakdown-row.breakdown-total {
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.25);
    font-weight: 600;
}

.wallet-navbar-widget .balance-breakdown-row.breakdown-pending .breakdown-value {
    color: var(--warn-bd); /* WP-4: #fde68a exact match */
}

/* Quick Actions */
.wallet-navbar-widget .quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.wallet-navbar-widget .action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--easing-base);
}

.wallet-navbar-widget .deposit-btn {
    background: var(--success-hover);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.wallet-navbar-widget .deposit-btn:hover {
    background: var(--success); /* WP-4 [5/5] DECISION-B: emerald hover → --success */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.wallet-navbar-widget .withdraw-btn {
    background: var(--warn);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.wallet-navbar-widget .withdraw-btn:hover {
    background: #D97706; /* WP-4 [5/5] scope-exit: Tailwind amber-600, kein Token (UMSTRITTEN) */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.wallet-navbar-widget .action-btn:active {
    transform: translateY(0);
}

.wallet-navbar-widget .action-btn svg {
    width: 20px;
    height: 20px;
}

/* Full Overview Link */
.wallet-navbar-widget .full-overview-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-top: 12px;
    background: var(--neutral-100);
    border: 2px solid var(--neutral-200);
    border-radius: 12px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--duration-fast) var(--easing-base);
}

.wallet-navbar-widget .full-overview-link:hover {
    background: var(--banner-info-bg);
    border-color: var(--accent);
    transform: translateX(4px);
}

.wallet-navbar-widget .full-overview-link svg:first-child {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.wallet-navbar-widget .full-overview-link svg:last-child {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

.wallet-navbar-widget .full-overview-link span {
    flex: 1;
    margin: 0 8px;
}

/* Placeholder */
.wallet-navbar-widget .wallet-placeholder {
    text-align: center;
    padding: 40px 20px;
    background: var(--neutral-50);
    border-radius: 12px;
    border: 2px dashed var(--neutral-200);
}

.wallet-navbar-widget .placeholder-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted); /* S114: neutral-500 → semantic token (dark-mode-aware) */
    margin: 0 auto 16px;
}

.wallet-navbar-widget .wallet-placeholder p {
    margin: 0 0 8px 0;
    color: var(--text-muted); /* S114: neutral-600 → semantic token (dark-mode-aware) */
    font-size: 15px;
    font-weight: 500;
}

.wallet-navbar-widget .placeholder-subtitle {
    font-size: 13px;
    color: var(--text-muted); /* S114: neutral-500 → semantic token (dark-mode-aware) */
    font-weight: 400;
}

/* ===========================================
   LANGUAGE SWITCHER
   =========================================== */
.language-switcher {
    position: relative;
    display: inline-block;
}

/* Fixed position for standalone pages (no navbar) */
.language-switcher-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-switcher-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-surface);
    border: var(--border-thin) solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-family);
    font-size: var(--text-caption);
    font-weight: 700;
    transition: all var(--duration-fast) var(--easing-base);
}

.language-switcher-btn:hover {
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

.language-switcher-btn:active {
    transform: translateY(0);
}

.language-switcher-btn.loading {
    opacity: 0.6;
    cursor: wait;
}

.language-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.language-label {
    font-weight: 700;
    white-space: nowrap;
}

.chevron-icon {
    width: 16px;
    height: 16px;
    transition: transform var(--duration-fast) var(--easing-base);
}

.language-dropdown.hidden ~ .language-switcher-btn .chevron-icon,
.language-switcher-btn .chevron-icon {
    transform: rotate(0deg);
}

.language-dropdown:not(.hidden) ~ .language-switcher-btn .chevron-icon {
    transform: rotate(180deg);
}

/* Language Dropdown */
.language-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 180px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: var(--border-thin) solid var(--border-default);
    z-index: 1500;
    overflow: hidden;
    transition: opacity var(--duration-fast), transform var(--duration-fast);
}

.language-dropdown.hidden {
    display: none;
}

.language-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-family);
    font-size: var(--text-caption);
    text-align: left;
    transition: background var(--duration-fast) var(--easing-base);
}

.language-option:hover {
    background: var(--bg-subtle);
}

.language-option.active {
    background: var(--bg-subtle);
    color: var(--accent);
    font-weight: 700;
}

.language-option .flag {
    font-size: 20px;
}

.language-option .lang-label {
    flex: 1;
}

.language-option .checkmark {
    color: var(--accent);
    font-weight: bold;
}

/* Loading Animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.language-switcher-btn.loading .language-icon {
    animation: rotate 1s linear infinite;
}

/* Language switcher in navbar inherits base .language-switcher-btn semantic tokens — no override needed */

/* ===========================================
   HAMBURGER BUTTON (always visible)
   =========================================== */
.navbar-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 7px;
    background: transparent;
    border: var(--border-thin) solid var(--border-default);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--duration-fast) var(--easing-base);
    flex-shrink: 0;
}

.navbar-hamburger:hover {
    background: var(--bg-subtle);
}

.navbar-hamburger-bar {
    width: 100%;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: transform 0.22s ease, opacity 0.15s ease;
    transform-origin: center;
}

.navbar-hamburger.is-open .navbar-hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar-hamburger.is-open .navbar-hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.navbar-hamburger.is-open .navbar-hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===========================================
   DRAWER OVERLAY + PANEL (mobile)
   =========================================== */
.navbar-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 17, 23, 0.45);
    z-index: 1090;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
}

.navbar-drawer-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.navbar-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: calc(100vw - 56px);
    max-width: 360px;
    background: var(--bg-surface);  /* S113: semantic token — dark-mode-aware */
    box-shadow: -4px 0 32px rgba(6, 15, 28, 0.18);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(.32, 1, .23, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Figtree', system-ui, -apple-system, sans-serif;
}

.navbar-drawer.is-open {
    transform: translateX(0);
}

.navbar-drawer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 32px 24px 16px;
    border-bottom: 1px solid var(--border-default);  /* S113: semantic token */
    flex-shrink: 0;
    position: relative;
}

.navbar-drawer-brand {
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}

.navbar-drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--neutral-100) !important;
    border: none !important;
    border-radius: 6px !important;
    color: var(--text-muted) !important;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
    box-shadow: none !important;
    outline: none;
    flex-shrink: 0;
    line-height: 1;
}

.navbar-drawer-close:hover {
    background: var(--neutral-300) !important;
    color: var(--text-primary) !important;
}

/* Drawer user header */
.navbar-drawer-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.navbar-drawer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--neutral-300);
    color: var(--color-900);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.navbar-drawer-avatar--teacher {
    background: var(--neutral-300);
    color: var(--color-900);
}

.navbar-drawer-avatar--student {
    background: var(--neutral-100);
    color: var(--text-primary);
}

.navbar-drawer-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.navbar-drawer-user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-drawer-user-email {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-drawer-role-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    background: none;
    padding: 0;
    border-radius: 0;
    text-transform: capitalize;
}

.navbar-drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    gap: 0;
    flex: 1;
    overflow-y: auto;
}

.navbar-drawer-link {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 16px;
    padding: 12px 20px;
    min-height: 48px;
    font-family: 'Figtree', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    text-align: left !important;
    line-height: 1.4;
    transition: background 150ms ease, color 150ms ease;
}

.navbar-drawer-link > svg {
    flex-shrink: 0;
    min-width: 15px;
}

.navbar-drawer-link > span {
    flex: 1 1 auto;
    text-align: left;
}

.navbar-drawer-link:hover {
    background: var(--neutral-50);
    color: var(--text-primary);
}

.navbar-drawer-link.active {
    background: var(--neutral-100);
    color: #4d7aa0; /* WP-4 [5/5] scope-exit: slate-blue hint, kein Token */
    font-weight: 600;
}

/* Danger hover for logout in drawer */
.navbar-drawer-link--logout {
    color: var(--text-muted);
}

.navbar-drawer-link--logout:hover {
    background: var(--danger-bg);
    color: var(--danger-text);
}

/* ===========================================
   DRAWER — DARK MODE
   =========================================== */
/* WP-4 [2/5] (2026-06-03): Tailwind-Grays migriert → DECISION-B (Bootstrap-Neutral).
   #111827→--neutral-900, #f9fafb→--neutral-50, #9ca3af→--neutral-500,
   #374151→--neutral-700, #d1d5db→--neutral-300.
   Kein Token (→ WP-4 [5/5]): #1e3a52(2) #cfe0f0(1) #1e2a3a(2) #7fb0d8(2) #3a1f1d(1) #f87171(1) */
@media (prefers-color-scheme: dark) {
    .nav,
    .unified-navbar,
    .lang-nav {
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.40), 0 2px 4px rgba(0, 0, 0, 0.28);
    }

    .navbar-drawer {
        background: var(--neutral-900); /* WP-4: #111827 → DECISION-B */
        box-shadow: -4px 0 32px rgba(0, 0, 0, 0.5);
    }

    .navbar-drawer-overlay {
        background: rgba(0, 0, 0, 0.6);
    }

    .navbar-drawer-header {
        border-bottom-color: var(--neutral-800);
    }

    .navbar-drawer-brand,
    .navbar-drawer-user-name {
        color: var(--neutral-50); /* WP-4: #f9fafb → DECISION-B */
    }

    .navbar-drawer-user-email,
    .navbar-drawer-role-badge {
        color: var(--neutral-500); /* WP-4: #9ca3af → DECISION-B */
    }

    .navbar-drawer-close {
        background: var(--neutral-800) !important;
        color: var(--neutral-500) !important; /* WP-4: #9ca3af → DECISION-B */
    }
    .navbar-drawer-close:hover {
        background: var(--neutral-700) !important; /* WP-4: #374151 → DECISION-B */
        color: var(--neutral-50) !important;       /* WP-4: #f9fafb → DECISION-B */
    }

    .navbar-drawer-avatar,
    .navbar-drawer-avatar--teacher {
        background: var(--dark-avatar-bg); /* WP-4 [5/5] B15: EXACT #1e3a52 */
        color: var(--dark-avatar-fg);      /* WP-4 [5/5] B15: EXACT #cfe0f0 */
    }
    .navbar-drawer-avatar--student {
        background: var(--neutral-800);
        color: var(--neutral-300); /* WP-4: #d1d5db → DECISION-B */
    }

    .navbar-drawer-link {
        background: var(--neutral-900, #111827) !important;  /* explicit: avoid UA button white */
        -webkit-appearance: none;
        appearance: none;
        border: none;
        color: var(--neutral-300) !important; /* S115: !important — override UA color-scheme:dark on <button> */
    }
    .navbar-drawer-link:hover {
        background: var(--neutral-800);
        color: var(--neutral-50); /* WP-4: #f9fafb → DECISION-B */
    }
    .navbar-drawer-link.active {
        background: var(--dark-active-bg); /* WP-4 [5/5] B15: EXACT #1e2a3a */
        color: var(--dark-active-fg);      /* WP-4 [5/5] B15: EXACT #7fb0d8 */
    }
    .navbar-drawer-link--logout {
        color: var(--neutral-500); /* WP-4: #9ca3af → DECISION-B */
    }
    .navbar-drawer-link--logout:hover {
        background: var(--toast-error-bg); /* WP-4 [5/5] DECISION-B: dark-red hover */
        color: var(--vis-group-full);      /* WP-4 [5/5] EXACT: #f87171 = --vis-group-full */
    }

    /* Settings-Bereich (Sprache / Währung / Zeitzone) */
    .navbar-dropdown-settings {
        border-top-color: var(--neutral-800);
    }
    .navbar-drawer-plain-btn,
    .navbar-drawer-plain-btn--static {
        color: var(--neutral-300); /* WP-4: #d1d5db → DECISION-B */
    }
    .navbar-drawer-plain-btn:hover {
        background: var(--neutral-800);
    }
    .navbar-drawer-plain-lang-label,
    .navbar-drawer-plain-currency-label {
        color: var(--neutral-500); /* WP-4: #9ca3af → DECISION-B */
    }
    .navbar-drawer-select-dropdown {
        background: var(--neutral-800);
        color: var(--neutral-50);   /* WP-4: #f9fafb → DECISION-B */
        border-color: var(--neutral-700); /* WP-4: #374151 → DECISION-B */
    }

    /* Wallet im Drawer */
    .navbar-drawer-wallet .wallet-button {
        background: var(--neutral-800);
        color: var(--neutral-50); /* WP-4: #f9fafb → DECISION-B */
    }
    .navbar-drawer-wallet .wallet-panel {
        background: var(--neutral-900); /* WP-4: #111827 → DECISION-B */
        border-color: var(--neutral-800);
    }

    .navbar-drawer-footer {
        border-top-color: var(--neutral-800);
    }

    /* Wallet-Panel-Inhalte im Drawer (full-overview-link, placeholder) */
    .wallet-navbar-widget .wallet-panel-header {
        border-bottom-color: var(--neutral-800);
    }
    .wallet-navbar-widget .wallet-panel-header h3 {
        color: var(--neutral-50);
    }
    .wallet-navbar-widget .full-overview-link {
        background: var(--neutral-800);
        border-color: var(--neutral-700);
        color: var(--color-400);
    }
    .wallet-navbar-widget .full-overview-link:hover {
        background: var(--neutral-700);
    }
    .wallet-navbar-widget .wallet-placeholder {
        background: var(--neutral-800);
        border-color: var(--neutral-700);
    }
    .wallet-navbar-widget .wallet-placeholder p,
    .wallet-navbar-widget .placeholder-subtitle {
        color: var(--neutral-400);
    }
    .wallet-navbar-widget .close-button {
        color: var(--neutral-400);
    }
    .wallet-navbar-widget .close-button:hover {
        background: var(--neutral-800);
        color: var(--neutral-50);
    }

    /* Auswahl-Dropdowns im Drawer (Waehrung / Sprache / Zeitzone) */
    .navbar-select-dropdown {
        background: var(--neutral-900); /* WP-4: #111827 → DECISION-B */
        border-color: var(--neutral-800);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    }
    .navbar-select-option {
        color: var(--neutral-300); /* WP-4: #d1d5db → DECISION-B */
    }
    .navbar-select-option:hover {
        background: var(--neutral-800);
    }
    .navbar-select-option.is-selected {
        background: var(--dark-active-bg); /* WP-4 [5/5] B15: EXACT #1e2a3a */
        color: var(--dark-active-fg);      /* WP-4 [5/5] B15: EXACT #7fb0d8 */
    }
    .navbar-select-name {
        color: var(--neutral-500); /* WP-4: #9ca3af → DECISION-B */
    }
    .navbar-select-option + .navbar-select-option {
        border-top-color: var(--neutral-800);
    }
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    .nav,
    .unified-navbar,
    .lang-nav {
        padding: 0 var(--space-3);
        height: 64px;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: var(--space-2);
    }

    /* Logo bleibt links */
    .unified-logo {
        justify-self: start;
    }

    /* Hauptnavigation komplett in den Drawer */
    .nav-links,
    .lang-nav-links,
    .unified-nav-links {
        display: none;
    }

    .nav-mobile-toggle {
        display: block;
    }

    .nav.mobile-open .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-bottom: var(--border-thin) solid var(--border-default);
        padding: var(--space-4);
        gap: var(--space-3);
    }

    /* Actions: rechts ausgerichtet, kompakter Gap */
    .nav-actions,
    .lang-nav-actions,
    .unified-nav-actions {
        gap: var(--space-2);
        justify-self: end;
    }

    /* Diese Settings wandern in den Drawer */
    .lang-nav-time,
    .tz-clock-btn,
    #language-switcher-container,
    #btn-toggle-visibility {
        display: none;
    }

    /* Wallet wird per JS aus der Top-Navbar in den Drawer gemoved.
       Dieses Fallback-CSS versteckt die Top-Variante, falls JS noch nicht lief. */
    .unified-navbar #wallet-navbar-container,
    .lang-nav #wallet-navbar-container {
        display: none !important;
    }

    /* Chat ist als Floating-FAB sichtbar (siehe js/scroll-to-top.js).
       Top-Icon ist in den navbar-alt.html-Dateien auskommentiert. */

    /* Wallet responsive */
    .wallet-navbar-widget .wallet-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    }

    .wallet-navbar-widget .wallet-balance {
        font-size: 14px;
        min-width: 50px;
    }

    .wallet-navbar-widget .wallet-button {
        padding: 6px 12px;
    }

    .wallet-navbar-widget .balance-amount {
        font-size: 32px;
    }

    .wallet-navbar-widget .quick-actions {
        grid-template-columns: 1fr;
    }

    /* Language switcher responsive */
    .language-switcher-btn {
        padding: 6px 10px;
    }

    .language-label {
        display: none;
    }

    .language-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .language-dropdown:not(.hidden) {
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    .nav,
    .unified-navbar,
    .lang-nav {
        padding: 0 var(--space-3);
        gap: var(--space-2);
    }

    .unified-brand-name {
        display: none;
    }

    /* Wallet responsive */
    .wallet-navbar-widget .wallet-icon {
        width: 18px;
        height: 18px;
    }

    .wallet-navbar-widget .wallet-balance {
        font-size: 13px;
    }

    .wallet-navbar-widget .wallet-chevron {
        width: 14px;
        height: 14px;
    }
}

/* ===========================================
   DRAWER — MOBILE OPTIMIERUNG (<= 768px)
   Der gesamte Drawer wird scrollbar (statt nur die Nav-Section).
   Das gibt mehr Flexibilitaet, wenn Wallet + Settings + Footer den
   Drawer fuellen.
   =========================================== */
@media (max-width: 768px) {
    .navbar-drawer {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Nav nicht mehr alleinige Scroll-Section; flex aufheben */
    .navbar-drawer-nav {
        flex: 0 0 auto;
        overflow: visible;
    }
    /* Trennlinien zwischen Sections fuer optische Klarheit */
    .navbar-drawer-wallet {
        border-top: 1px solid var(--neutral-100);
    }
    .navbar-dropdown-settings {
        border-top: 1px solid var(--neutral-100);
    }
    /* Footer fuellt restlichen Platz auf und kuschelt am Ende */
    .navbar-drawer-footer {
        margin-top: auto;
    }
}

/* ===========================================
   DRAWER — HEIGHT-RESPONSIVE (landscape mobile)
   =========================================== */
@media (max-height: 500px) {
    .navbar-drawer-header {
        padding: 12px 24px 10px;
    }
    .navbar-drawer-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .navbar-drawer-user-name {
        font-size: 14px;
    }
    .navbar-drawer-user-email {
        font-size: 11px;
    }
    .navbar-drawer-link {
        padding: 7px 20px;
        font-size: 14px;
    }
    .navbar-drawer-plain-btn {
        min-height: 36px;
        padding: 4px 0;
    }
    .navbar-dropdown-settings {
        padding: 2px 24px 6px;
    }
    .navbar-drawer-footer {
        padding: 4px 0;
    }
}

@media (max-height: 400px) {
    .navbar-drawer-header {
        padding: 8px 24px 8px;
    }
    .navbar-drawer-link {
        padding: 5px 20px;
        font-size: 13px;
    }
}

/* ===========================================
   FILTER TOGGLE BUTTON (Navbar Filter Icon)
   =========================================== */
#filter-toggle-container {
    display: none; /* Hidden by default, shown on catalog page */
    align-items: center;
    justify-content: center;
    height: 44px;
}

.navbar-filter-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--neutral-400);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-size: 12px;
    position: relative;
    min-width: 44px;
    height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

.navbar-filter-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.navbar-filter-toggle-btn:active {
    background: var(--bg-subtle);
}

.navbar-filter-toggle-btn.filter-hidden {
    opacity: 0.6;
}

.filter-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.filter-toggle-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.navbar-filter-toggle-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    #filter-toggle-container {
        display: flex;
        order: -1; /* Show before wallet */
    }

    .navbar-filter-toggle-btn {
        padding: 6px;
    }
}

/* ===========================================
   JS-TRIGGERED STATES
   =========================================== */
/* Temporärer Scroll-Highlight für Zeitslots (gesetzt via classList in unified-navbar.js) */
.time-slot-highlight {
    background-color: #ffeb3b !important; /* intentional: JS-debug Scroll-Highlight, kein Token */
    transition: background-color 2s ease;
}

/* ===========================================
   BRAND NAVY OVERRIDE  2026-06-10
   Navbar immer in --color-900 (Navy #060f1c),
   egal ob eingeloggt oder nicht.
   =========================================== */

/* Basis: Navy-Hintergrund, kein heller Border */
.nav,
.unified-navbar,
.lang-nav {
    background: var(--color-900);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 1px 3px rgba(6,15,28,0.4);
}

/* Logo / Brand-Name */
.unified-brand-name,
.lang-nav-brand-name {
    color: var(--neutral-0);
}

/* Nav Links — semitransparentes Weiß auf dunkel */
.nav-link,
.lang-nav .lang-nav-link,
.lang-nav a.lang-nav-link,
.lang-nav button.lang-nav-link,
.unified-nav-link {
    color: rgba(255,255,255,0.75);
}

.nav-link:hover,
.lang-nav .lang-nav-link:hover,
.unified-nav-link:hover {
    color: var(--neutral-0);
}

.nav-link.is-active,
.lang-nav .lang-nav-link.is-active,
.lang-nav .lang-nav-link.active,
.unified-nav-link.active {
    color: var(--neutral-0);
}

/* Aktiv-Unterstrich: weiß auf navy */
.nav-link.is-active::after,
.lang-nav .lang-nav-link.is-active::after,
.lang-nav .lang-nav-link.active::after,
.unified-nav-link.active::after {
    background: var(--neutral-0);
}

/* Logout — gedämpft */
.lang-nav .lang-nav-link--logout {
    color: rgba(255,255,255,0.5);
}

.lang-nav .lang-nav-link--logout:hover {
    color: rgba(255,255,255,0.85);
}

/* Action Buttons — transparent Ghost auf dunklem Grund */
.lang-nav .lang-nav-btn,
.lang-nav a.lang-nav-btn,
.lang-nav button.lang-nav-btn,
.unified-action-item {
    background: transparent;
    border-color: rgba(255,255,255,0.35);
    color: var(--neutral-0);
}

@media (hover: hover) and (pointer: fine) {
    .lang-nav .lang-nav-btn:hover,
    .unified-action-item:hover {
        background: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.6);
        color: var(--neutral-0);
    }
}

/* Hamburger */
.navbar-hamburger {
    border-color: rgba(255,255,255,0.25);
}

@media (hover: hover) and (pointer: fine) {
    .navbar-hamburger:hover {
        background: rgba(255,255,255,0.1);
    }
}

.navbar-hamburger-bar {
    background: var(--neutral-0);
}

/* Zeitwahl-Dropdown in Navbar (calendar pages) */
.lang-nav-time-select {
    background: rgba(255,255,255,0.1);
    color: var(--neutral-0);
    border-color: rgba(255,255,255,0.25);
}
