/* ============================================================
   SIDE PANEL + STOFF-LASCHE (wiederverwendbar)
   ============================================================ */

.side-panel,
.side-panel *,
.side-panel-ghost,
.side-panel-ghost * {
    box-sizing: border-box;
}

.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: 420px;
    max-width: 90vw;
    z-index: 1000000; /* ueber fixierten Eingabezeilen der Seiten (z.B. Chat 999999) */
    transform: translateX(100%);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.side-panel.open {
    transform: translateX(0);
}

.side-panel-content {
    height: 100%;
    width: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 30px 25px;
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.side-panel-content::-webkit-scrollbar {
    display: none;
}

.side-panel .header {
    /* Seiten-CSS fuer .header (fixiert, zentriert, Hintergrund ...) hier neutralisieren */
    position: static !important;
    display: block !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 0 20px 0 !important;
    cursor: pointer;
    transform: none !important;
    opacity: 1 !important;
    z-index: auto !important;
}

.side-panel-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.side-panel-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
}

.side-panel-heading-text {
    min-width: 0;
}

.side-panel h1 {
    font-size: 1.7em;
    margin: 0 0 4px 0;
    line-height: 1.1;
    color: var(--text-color, #e0e0e0);
}

.side-panel .subtitle {
    font-size: 0.85em;
    color: #888;
    cursor: default;
    margin: 0;
    padding: 0;
}

.side-panel-footer:empty {
    display: none;
}

/* ---------- Lasche (Stofflabel) ---------- */
.side-panel-tab {
    position: absolute;
    top: 68%;
    left: -44px;
    transform: translateY(-50%);
    width: 44px;
    padding: 26px 0;
    margin-right: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 10px 0 0 10px;
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 4px),
        linear-gradient(100deg, #4a4a4a 0%, #333 45%, #2b2b2b 100%);
    box-shadow:
        -5px 5px 14px rgba(0, 0, 0, 0.55),
        inset 1px 0 0 rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: left 0.2s ease, width 0.2s ease, filter 0.2s ease;
}

.side-panel-tab:hover {
    filter: brightness(1.12);
}

body.side-panel-open .side-panel-tab {
    width: 56px;
    left: -56px;
}

.side-panel-tab::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 5px;
    right: 0;
    border: 1px dashed rgba(255, 255, 255, 0.32);
    border-right: none;
    border-radius: 6px 0 0 6px;
    pointer-events: none;
}

.side-panel-tab::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 6px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
    pointer-events: none;
}

.side-panel-tab-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-family: 'Courier New', 'Segoe UI', 'Yu Gothic UI', 'Meiryo', 'Noto Sans JP', sans-serif;
    font-size: 0.95em;
    font-weight: bold;
    letter-spacing: 3px;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    font-variant-emoji: text;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.25s ease, filter 0.25s ease, letter-spacing 0.25s ease;
}

.side-panel-tab-label.swapping {
    opacity: 0;
    filter: blur(4px);
    letter-spacing: 8px;
}

/* ---------- Unsichtbarer Klickbereich (Position der geschlossenen Lasche) ---------- */
.side-panel-ghost {
    position: fixed;
    top: 68%;
    right: 0;
    transform: translateY(-50%);
    width: 44px;
    padding: 26px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    cursor: pointer;
}

body.side-panel-open .side-panel-ghost {
    visibility: visible;
    pointer-events: auto;
}

/* ---------- Unterer Bereich ---------- */
.side-panel-bottom {
    margin-top: auto;
    padding-top: 20px;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Detail-Ansicht (aufgeklappte Card) */
.side-panel-detail:empty {
    display: none;
}

.side-panel-detail {
    margin-bottom: 15px;
}

.side-panel-detail #login-expanded-view {
    padding: 0 !important;
    height: auto !important;
}

.side-panel-detail .dashboard-card.in-panel.expanded {
    opacity: 1;
    animation: panelCardSlideUp 0.42s cubic-bezier(0.18, 1.12, 0.3, 1);
}

@keyframes panelCardSlideUp {
    from {
        opacity: 0.4;
        transform: translateY(70vh);
    }
    60% {
        opacity: 1;
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Kachel-Zeile - feste Groesse, bricht automatisch um */
.side-panel-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

/* Card als kompakte Kachel */
.side-panel-footer .dashboard-card.in-panel {
    box-sizing: border-box;
    flex: 1 1 0;
    min-width: 60px;
    max-width: 100%;
    height: 76px;
    min-height: 0;
    margin: 0;
    padding: 8px 4px;
    cursor: pointer;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    opacity: 1;
    transform: none;
    animation: none;
}

.side-panel-footer .dashboard-card.in-panel #login-default-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    height: auto;
    min-height: 0;
}

.side-panel-footer .dashboard-card.in-panel .card-icon,
.side-panel-footer .dashboard-card.in-panel .card-icon img {
    width: 26px;
    height: 26px;
    margin: 0 auto;
    display: block;
}

.side-panel-footer .dashboard-card.in-panel .card-title {
    font-size: 9px;
    line-height: 1.1;
    margin: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-panel-footer .dashboard-card.in-panel .card-description,
.side-panel-footer .dashboard-card.in-panel .connection-status,
.side-panel-footer .dashboard-card.in-panel #login-expanded-view {
    display: none !important;
}

/* Aktive Kachel (Card ist aufgeklappt) - Klick = zuklappen */
.side-panel-tile-placeholder {
    box-sizing: border-box;
    flex: 1 1 0;
    min-width: 60px;
    height: 76px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background 0.2s ease;
}

.side-panel-tile-placeholder:hover {
    background: rgba(255, 255, 255, 0.18);
}

.side-panel-tile-placeholder img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

.side-panel-tile-placeholder span {
    font-size: 9px;
    line-height: 1.1;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color, #e0e0e0);
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
    .side-panel {
        width: 85vw;
    }

    .side-panel-tab {
        left: -36px;
        width: 36px;
        padding: 20px 0;
    }

    body.side-panel-open .side-panel-tab {
        width: 46px;
        left: -46px;
    }

    .side-panel-ghost {
        width: 36px;
        padding: 20px 0;
    }
}

/* Aufgeklappte Card integriert sich rahmenlos ins Panel */
.side-panel-detail .dashboard-card.in-panel.expanded {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    min-height: 0 !important;
    display: block !important;
}

.side-panel-detail .dashboard-card.in-panel.expanded::before {
    display: none !important;
}

.side-panel-detail .dashboard-card.in-panel.expanded:hover {
    transform: none;
}

.side-panel-detail .dashboard-card.in-panel.expanded .card-title,
.side-panel-detail .dashboard-card.in-panel.expanded .card-description,
.side-panel-detail .dashboard-card.in-panel.expanded .connection-status {
    display: none !important;
}

/* Login-Formular im Panel: groessere Felder & Buttons */
.side-panel-detail #login-expanded-view input {
    padding: 13px 12px !important;
    font-size: 15px !important;
    margin-bottom: 10px !important;
}

#login-expanded-view .pbtn {
    flex: 1;
    min-height: 48px;
    padding: 14px 8px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    transition: all 0.22s ease;
}

/* Aktiver Button - edler Glas-Verlauf im jeweiligen Farbton */
.pbtn-primary.pbtn-login { --tone: 102, 126, 234; }
.pbtn-primary.pbtn-register { --tone: 81, 207, 102; }
.pbtn-primary.pbtn-reset { --tone: 255, 165, 0; }

#login-expanded-view .pbtn-primary {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 55%),
        linear-gradient(160deg, rgba(var(--tone), 0.88), rgba(var(--tone), 0.5));
    border-color: rgba(var(--tone), 0.65);
    box-shadow:
        0 6px 18px rgba(var(--tone), 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

#login-expanded-view .pbtn-primary:hover {
    filter: brightness(1.08);
}

/* Inaktive Buttons - transparent/glasig */
#login-expanded-view .pbtn-ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#login-expanded-view .pbtn-ghost:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

#login-expanded-view .pbtn img {
    width: 20px;
    height: 20px;
    opacity: 0.85;
}

#login-expanded-view .pbtn svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Unsichtbares Suchfeld (oeffnet die Tastatur auf Mobilgeraeten) */
.panel-search-input {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    border: 0;
    padding: 0;
    font-size: 16px;
}

/* Statische Kacheln (Seiten ohne dashboard-cards) */
.side-panel-footer .panel-tile {
    box-sizing: border-box;
    flex: 1 1 0;
    min-width: 60px;
    height: 76px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color, #e0e0e0);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    background-color: rgba(42, 42, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    transition: all 0.25s ease;
}

.side-panel-footer .panel-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
}

.side-panel-footer .panel-tile img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

.side-panel-footer .panel-tile span {
    font-size: 9px;
    line-height: 1.1;
    max-width: 100%;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-panel-tile-placeholder span {
    margin: 0;
}
/* ============================================================
   SEITEN-WERKZEUGE IM PANEL (Suche, Filter, Knoepfe, Formulare)
   ============================================================ */

/* Wischen am Rand: kein Vor/Zurueck des Browsers */
html, body {
    overscroll-behavior-x: none;
}

.side-panel-tools {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    min-width: 0;
}

.side-panel-tools .panel-tool,
.side-panel-tools .panel-tool * {
    max-width: 100%;
}



.side-panel-tools .panel-tool {
    position: relative;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    order: 0;
    flex: none;
    opacity: 1 !important;
    transform: none !important;
    z-index: auto !important;
}

/* Suche oberhalb der Knoepfe, Vorschlaege klappen nach oben auf */
#side-panel-tools .panel-tool-search {
    order: -1;
    display: block !important;
    flex: none !important;
}

#side-panel-tools .panel-tool-search input {
    width: 100% !important;
    max-width: none !important;
    font-size: 16px;
    box-sizing: border-box;
}

#side-panel-tools .command-suggestions {
    position: absolute !important;
    top: auto !important;
    bottom: calc(100% + 6px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 50vh;
    overflow-y: auto;
    z-index: 20 !important;
}

/* Kennzahlen/Filter als kompakte 2er-Reihe */
#side-panel-tools .panel-tool-stats {
    display: grid !important;
    grid-template-columns: repeat(var(--stat-cols, 2), minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 8px !important;
}

#side-panel-tools .panel-tool-stats .stat {
    min-width: 0 !important;
    overflow: hidden !important;
    padding: 8px 6px !important;
    min-height: 0 !important;
}

#side-panel-tools .panel-tool-stats .stat h3 {
    white-space: nowrap !important;
    font-size: 1.1em !important;
    margin: 0 0 2px 0 !important;
}

#side-panel-tools .panel-tool-stats .stat p {
    font-size: 0.75em !important;
    margin: 0 !important;
}

/* Knopf-Reihen (Menues, Tabs, Monats-Navigation, Steuerung) */
#side-panel-tools .panel-tool-actions,
#side-panel-tools .panel-tool-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    position: static !important;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    min-width: 0 !important;
    visibility: visible !important;
}

#side-panel-tools .panel-tool-actions > *,
#side-panel-tools .panel-tool-nav > * {
    flex: 1 0 auto;
    margin: 0 !important;
    width: auto !important;
    white-space: nowrap;
}

/* Monats-Knoepfe: 4 pro Reihe, Pfeile weg (Monat direkt waehlen) */
#side-panel-tools .panel-grid-4 {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px !important;
    margin: 0 !important;
}

#side-panel-tools .panel-grid-4 > * {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 10px 4px !important;
    flex: none !important;
}

#side-panel-tools .panel-grid-4 > .nav-arrow {
    display: none !important;
}

/* Eine Zeile, waagrecht scrollbar (Finger oder Mausrad) */
#side-panel-tools .panel-scroll-x {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
}

#side-panel-tools .panel-scroll-x::-webkit-scrollbar {
    display: none;
}

#side-panel-tools .menu-content .menu-item {
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-color, #e0e0e0);
}

#side-panel-tools .menu-content .menu-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

#side-panel-tools .menu-content .menu-item i {
    color: inherit;
}

#side-panel-tools .panel-tool-filters {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
}

#side-panel-tools .panel-tool-filters > * {
    flex: 0 0 auto;
}

/* Eingabe-Formulare (Neuer Kunde / Artikel): Handy ganzseitig, PC als Fenster ueber abgedunkelter Seite */
body.panel-form-open {
    overflow: hidden !important;
}

body.panel-form-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1000150;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.panel-form.visible {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000200 !important;
    margin: 0 !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    border-radius: 0 !important;
    background-color: rgba(26, 26, 26, 0.97) !important;
    opacity: 1 !important;
    transform: none !important;
    animation: panelFormIn 0.18s ease-out;
}

@keyframes panelFormIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (min-width: 769px) {
    .panel-form.visible {
        inset: auto !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: min(900px, 92vw) !important;
        max-height: 88vh !important;
        border-radius: 14px !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
    }
}

/* Drei-Punkte-Menue ist ins Panel gewandert */
body.panel-has-tools .chat-header .menu-dropdown {
    display: none !important;
}

/* Listen-Seiten: Titel schlicht auf einer Zeile, Platz fuer den Inhalt */
body.panel-compact > .header {
    display: none !important;
}

/* Titelzeile immer an gleicher Stelle ganz oben, bleibt beim Scrollen stehen */
body.panel-compact {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.panel-compact > .section-title {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    padding: 14px 0 10px 0 !important;
    background: none !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin: 0 0 6px 0 !important;
    min-height: 0 !important;
}

body.panel-compact > .section-title h2 {
    flex: 1 1 auto !important;
    order: 0 !important;
    margin: 0 !important;
    font-size: 1.05em !important;
    font-weight: 600 !important;
    text-align: left !important;
    letter-spacing: 0.02em;
}

body.panel-compact > .section-title .count-container {
    flex: none !important;
    order: 1 !important;
    width: auto !important;
    font-size: 0.8em !important;
    opacity: 0.75;
}


/* Was side-panel.js ins Menue verschiebt, ab dem ersten Bild ausblenden (kein kurzes Aufblitzen oben).
   Auf Subdomains setzt embed.js dieselben Regeln schon im <head>. */
html:not(.zk-nopanel) body:has(> .section-title) > .header,
html:not(.zk-nopanel) body > .stat-container,
html:not(.zk-nopanel) body > .month-nav-buttons,
html:not(.zk-nopanel) body > .tab-navigation,
html:not(.zk-nopanel) .container > .tabs,
html:not(.zk-nopanel) body > .search-control-container,
html:not(.zk-nopanel) .section-title .search-container,
html:not(.zk-nopanel) .section-title .filter-container,
html:not(.zk-nopanel) .section-title .refresh-container,
html:not(.zk-nopanel) .header .search-container,
html:not(.zk-nopanel) .header .header-search,
html:not(.zk-nopanel) .header .header-controls,
html:not(.zk-nopanel) .email-list > .email-list-search,
html:not(.zk-nopanel) .chat-header .menu-dropdown {
    display: none !important;
}

/* Keine Scrollbalken - weder auf der Seite noch in Listen. Scrollen geht weiter mit Rad,
   Finger und Tastatur; rechts bleibt der Rand frei fuers Menue. */
html, body, * {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* ---------- Oben: wer ist angemeldet (auf jeder Seite gleich) ---------- */
.side-panel-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin: 0 0 18px 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-color, #e0e0e0);
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.side-panel-user:hover {
    background: rgba(255, 255, 255, 0.08);
}

.side-panel-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 17px;
    color: #fff;
    background: var(--accent-color, #6c5ce7);
}

.side-panel-avatar.guest {
    background: rgba(255, 255, 255, 0.12);
}

.side-panel-user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.side-panel-user-text strong {
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-panel-user-text small {
    font-size: 0.75em;
    color: #888;
}

/* ---------- Kopf (Icon, Titel, Untertitel/Suche) ganz unten ---------- */
.side-panel .side-panel-bottom > .header {
    padding: 18px 0 0 0 !important;
}

.side-panel .subtitle.search-active {
    color: var(--text-color, #e0e0e0);
}

/* Suchfeld der Seite unsichtbar - der Untertitel zeigt die Suche (wie auf der Startseite) */
#side-panel-tools .panel-tool-search.panel-search-hidden {
    position: absolute !important;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    overflow: visible !important;
}

#side-panel-tools .panel-tool-search.panel-search-hidden > input,
#side-panel-tools .panel-tool-search.panel-search-hidden input[type="text"],
#side-panel-tools .panel-tool-search.panel-search-hidden input[type="search"],
#side-panel-tools .panel-tool-search.panel-search-hidden input:not([type]) {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

#side-panel-tools .panel-tool-search.panel-search-hidden > :not(input):not(.command-suggestions):not([class*="suggestion"]):not(:has(input)):not(:has(.command-suggestions)) {
    display: none !important;
}

/* Einstellungen-Knopf rechts im User-Bereich */
.side-panel-user-gear {
    margin-left: auto;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #aaa;
    transition: background 0.15s ease, color 0.15s ease;
}

.side-panel-user-gear:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Login und ZockenUI sitzen oben im User-Bereich - keine Kacheln mehr unten */
.side-panel-footer {
    display: none !important;
}

/* Alle Formulare des Logins (Login, Register, Reset) volle Breite */
#login-expanded-view > div,
#login-expanded-view form {
    width: 100%;
}

/* Weitere Anmeldearten (Google, Twitch, Backup-Code) */
.login-alt-row {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

#login-expanded-view .login-alt {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.login-auth-error {
    color: #ff6b6b;
    font-size: 12px;
    margin: 0 0 8px 0;
}

.code-result-label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 6px;
}

.code-result-value {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    user-select: all;
}

#login-code::placeholder {
    text-transform: none;
    letter-spacing: 0;
}
