/* ===========================
   DESIGN TOKENS (Root)
   =========================== */
:root {
    --primary-bg-color: #111111;
    --secondary-bg-color: #222222;
    --accent-color: #e9a624;
    --text-color: #ffffff;
    --text-muted-color: #cccccc;
    --nav-hover-bg-color: #40444b;
    --sidebar-bg: #222222;

    --sidebar-width: 300px;
    --sidebar-collapsed: 100px;

    --footer-height: 42px;

    --log-height: 0px;
    --log-min-height: 0px;
    --log-max-height: 500px;
    --splitter-height: 16px;

    --decent-box-max-width: 2000px;

    /* Overlay-Translate der Sidebar (Default: außerhalb) */
    --sidebar-x: var(--sidebar-hidden, var(--sidebar-width));

    /* === NEUE SIZE / LAYOUT TOKENS === */
    --font-size-base: 16px;
    --font-size-small: 14px;
    --font-size-heading: 24px;
    --font-size-heading-large: 28px;

    --content-padding: 20px;
    --card-radius-global: 12px;
    --card-padding-global: 16px;

    --input-font-size: 17px;
    --label-font-size: 16px;
    --button-font-size: 16px;
    --button-height: 45px;

    --sidebar-font-size: 15px;
}

/* Attributgetriebener Overlay-Zustand */
html[data-menu="open"] {
    --sidebar-x: 0px;
}

html[data-menu="closed"] {
    --sidebar-x: var(--sidebar-hidden, var(--sidebar-width));
}

/* Light Mode Tokens */
body.light-mode {
    --primary-bg-color: #e0e0e0;
    --secondary-bg-color: #c1c1c1;
    --accent-color: #000000;
    --text-color: #222222;
    --text-muted-color: #666666;
    --nav-hover-bg-color: #dfe3e8;
    --sidebar-bg: #c1c1c1;
}

/* ===========================
   GLOBAL RESET / BASICS
   =========================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--primary-bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: var(--font-size-base);
}

/* App Container Höhe – moderne Browser */
@supports (height: 100dvh) {
    #app-container {
        height: 100dvh;
        display: flex;
        flex-direction: row;
        min-height: 0;
    }

    #sidebar {
        height: calc(100dvh - var(--log-height) - env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - var(--log-height) - env(safe-area-inset-bottom, 0px));
    }
}

/* Fallback */
@supports not (height: 100dvh) {
    #app-container {
        height: 100vh;
        display: flex;
        flex-direction: row;
        min-height: 0;
    }

    #sidebar {
        height: calc(100vh - var(--log-height) - env(safe-area-inset-bottom, 0px));
        max-height: calc(100vh - var(--log-height) - env(safe-area-inset-bottom, 0px));
    }
}

.bg-secondary {
    background: var(--secondary-bg-color);
}

/* FOUC vermeiden: Karten/Preview erst nach Load zeigen */
body.loading .product-grid,
body.loading .product-preview {
    display: none;
}

/* ===========================
   SIDEBAR (Desktop + Mobile)
   =========================== */
#sidebar {
    z-index: 420420;
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg) !important;
    padding: 1rem 1rem 0 1rem;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: width .3s ease, transform 240ms cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

/* Collapsed (Desktop & Mobile pinned) */
#sidebar.collapsed {
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
    max-width: var(--sidebar-collapsed);
}

#sidebar .nav {
    flex: 1 1 auto;
    overflow: auto;
    padding-right: 5px;
}

/* Optional: Desktop rechts andocken, wenn Row-Layout */
@media (hover:hover) and (pointer:fine) {
    #sidebar {
        margin-left: auto;
    }
}

/* ---------- Mobile Overlay von rechts ---------- */
@media (max-width: 900px),
(hover:none) and (pointer:coarse) {
    #content {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }

    #sidebar {
        order: 2;
    }

    /* Overlay (ungepinnt) */
    html[data-menu] #sidebar {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        bottom: calc(var(--log-height) + env(safe-area-inset-bottom, 0px));
        transform: translateX(var(--sidebar-x));
        touch-action: pan-y;
        background: var(--sidebar-bg) !important;
    }

    /* Klickfläche links der Sidebar (transparent) */
    #sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: var(--sidebar-width);
        bottom: var(--log-height, 0px);
        background: transparent;
        z-index: 420419;
        pointer-events: none;
    }

    html[data-menu="open"] #sidebar-backdrop {
        pointer-events: auto;
    }

    html[data-menu="closed"] #sidebar-backdrop {
        pointer-events: none;
    }

    /* Hamburger unten rechts */
    #mobile-hamburger {
        position: fixed;
        right: 14px;
        bottom: calc(12px + var(--log-height, 0px));
        z-index: 420420;
        pointer-events: auto;
    }

    #mobile-hamburger[hidden],
    #sidebar-backdrop[hidden] {
        display: none !important;
    }

    /* GEPINNT: im Flow rechts, ohne Overlay/Backdrop */
    body.sidebar-pinned-mobile #sidebar {
        position: static;
        transform: none !important;
        margin-left: auto;
    }

    body.sidebar-pinned-mobile #sidebar.collapsed {
        width: var(--sidebar-collapsed);
        min-width: var(--sidebar-collapsed);
        max-width: var(--sidebar-collapsed);
    }

    body.sidebar-pinned-mobile #sidebar-backdrop {
        display: none !important;
        pointer-events: none !important;
    }

    body.sidebar-pinned-mobile.sidebar-pinned-hidden #sidebar {
        display: none;
    }

}

/* Motion Preference */
@media (prefers-reduced-motion: reduce) {
    #sidebar {
        transition: none;
    }
}

/* Hamburger visueller Zustand (optional) */
#mobile-hamburger[aria-expanded="true"] {
    transform: translateX(calc(var(--sidebar-width) + 12px));
    opacity: .85;
    pointer-events: none;
}

/* Sidebar Bottom / Top / Scroll */
.sidebar-bottom {
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    background: var(--sidebar-bg) !important;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

body.light-mode .sidebar-bottom {
    border-top: 1px solid rgba(0, 0, 0, .2);
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

.sidebar-fixed-top {
    flex-shrink: 0;
}

.sidebar-scrollable {
    flex: 1 1 auto;
    overflow-y: auto;
    margin-top: 10px;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

/* Sidebar Links/Buttons vereinheitlicht */
#sidebar .nav-link,
#sidebar .sidebar-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 6px;
    transition: background-color .2s ease-in-out;
    font-weight: 500;
    font-size: var(--sidebar-font-size);
    text-decoration: none;
    color: var(--text-color);
    cursor: pointer;
}

#sidebar .nav-link:hover,
#sidebar .sidebar-button:hover {
    background: var(--nav-hover-bg-color);
}

#sidebar .nav-link.active {
    background: var(--accent-color);
    color: black !important;
    font-weight: bold;
    box-shadow: inset 0 0 8px rgba(255, 255, 0, .5);
}

body.light-mode #sidebar .nav-link.active,
body.light-mode #sidebar .sidebar-button.active {
    background: var(--accent-color);
    color: #fff !important;
}

/* Collapsed-Zustände */
#sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar-icon {
    width: 30px;
    height: 30px;
    margin-right: 8px;
    vertical-align: middle;
}

#sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 10px 0;
}

#sidebar.collapsed .nav-link .sidebar-icon {
    margin: 0;
}

/* Section Title */
.nav-section-title {
    padding: 8px 15px;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted-color);
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: 12px;
    margin-bottom: 6px;
    letter-spacing: .05em;
}

body.light-mode .nav-section-title {
    border-top: 1px solid rgba(0, 0, 0, .1);
    color: #666;
}

/* Sprache/Flag in Sidebar (einmalig) */
.sidebar-language {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--secondary-bg-color);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .1);
    transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}

.sidebar-language:hover {
    background: var(--nav-hover-bg-color);
    color: var(--text-color);
    box-shadow: 0 0 6px rgba(0, 0, 0, .3);
}

body.light-mode .sidebar-language {
    border: 1px solid rgba(0, 0, 0, .2);
}

.language-flag-small {
    width: 20px;
    height: 14px;
    margin-right: 8px;
}

/* Logo Größen */
#sidebar .sidebar-logo img {
    width: calc(var(--sidebar-width) - 100px);
    height: auto;
    transition: width .3s ease;
    display: block;
    margin: 0 auto;
}

#sidebar.collapsed #sidebar-logo {
    min-width: 55px;
    min-height: 55px;
}

#sidebar.collapsed .sidebar-logo img {
    min-width: 55px;
    min-height: 55px;
    object-fit: contain;
}

/* ===========================
   NAVIGATION LINKS (Content)
   =========================== */
.nav-link {
    font-weight: 500;
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 6px;
    transition: background-color .2s;
}

.nav-link:hover {
    background: var(--nav-hover-bg-color);
    text-decoration: none;
}

.nav-link.active {
    background: var(--accent-color);
    color: black !important;
    font-weight: bold;
    box-shadow: inset 0 0 8px rgba(255, 255, 0, .5);
}

body.light-mode .nav-link {
    color: var(--text-color) !important;
}

body.light-mode .nav-link.active {
    background: var(--accent-color);
    color: #fff !important;
}

/* ===========================
   CONTENT AREA
   =========================== */
#content {
    flex-grow: 1;
    min-height: 0;
    overflow: auto;
    padding: var(--content-padding);
    background: var(--primary-bg-color);
}

#content-area {
    padding: var(--content-padding);
    box-sizing: border-box;
}

#content-area h2 {
    font-size: var(--font-size-heading);
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

/* ===========================
   BUTTONS (global, konsolidiert) - Akzent Knopf
   =========================== */
button.btn-modern,
a.btn-modern {
    display: inline-block;
    width: 100%;
    max-width: 300px;
    height: var(--button-height);
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: var(--button-font-size);
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s, color .2s;
    background: var(--accent-color);
    color: var(--primary-bg-color);
}

button.btn-modern:hover,
a.btn-modern:hover {
    color: var(--primary-bg-color);
    transform: translateY(-3px);
}

button.btn-modern:disabled,
a.btn-modern:disabled {
    background: #777;
    color: #ccc;
    cursor: not-allowed;
    opacity: .6;
    box-shadow: none;
}

button.btn-small {
    padding: 6px 10px;
    min-width: 144px;
    height: 38px;
    background: #3c3c3c;
    color: #ccc;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: var(--font-size-small);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s, color .2s, border-color .2s;
}

button.btn-small:hover {
    background: #4a4a4a;
    border-color: #666;
    color: #eee;
}

button.btn-small:disabled {
    background: #555;
    color: #999;
    border-color: #555;
    cursor: not-allowed;
    opacity: .6;
    box-shadow: none;
}

/* Light Mode Buttons */
body.light-mode button.btn-modern,
body.light-mode a.btn-modern {
    background: var(--accent-color);
    color: var(--primary-bg-color);
}

body.light-mode button.btn-modern:disabled,
body.light-mode a.btn-modern:disabled {
    background: #bbb;
    color: #666;
}

body.light-mode button.btn-small {
    background: #ddd;
    color: #333;
    border: 1px solid #aaa;
}

body.light-mode button.btn-small:disabled {
    background: #ccc;
    color: #888;
    border-color: #ccc;
}

/* Blink (einmalig) */
.blink {
    animation: blinkAnimation .3s ease;
}

@keyframes blinkAnimation {
    0% {
        opacity: 1
    }

    50% {
        opacity: .4
    }

    100% {
        opacity: 1
    }
}

/* Inline-Buttons */
.btn-inline,
.btn-inline-slim,
.btn-inline-neutral {
    height: 38px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.btn-inline {
    padding: 6px 14px;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
}

.btn-inline:hover {
    background: var(--accent-color);
    color: var(--primary-bg-color);
    border-color: var(--accent-color);
}

.btn-inline-slim {
    padding: 4px 10px;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
}

.btn-inline-slim:hover {
    background: var(--accent-color);
    color: var(--primary-bg-color);
}

.btn-inline-neutral {
    padding: 4px 12px;
    border: 1px solid #666;
    background: #3c3c3c;
    color: #ddd;
}

.btn-inline-neutral:hover {
    background: #4a4a4a;
    color: #fff;
    border-color: #888;
}

body.light-mode .btn-inline,
body.light-mode .btn-inline-slim {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}

body.light-mode .btn-inline-neutral {
    border-color: #999;
    background: #ddd;
    color: #333;
}

/* ===========================
   FORMS (vereinheitlicht)
   =========================== */
label {
    display: block;
    font-weight: bold;
    font-size: var(--label-font-size);
    margin-bottom: 6px;
    line-height: 1.4;
    color: var(--text-color);
}

input,
select,
textarea {
    margin-bottom: 12px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="time"],
input[type="date"],
textarea,
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #40444b;
    color: var(--text-color);
    border: 1px solid #555;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: var(--input-font-size);
    height: 38px;
    width: 100%;
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
    outline: none;
}

/* Select mit Pfeil */
select {
    background-image: url("data:image/svg+xml,%3Csvg fill='%23eeee00' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    cursor: pointer;
}

/* Checkbox + .form-check-input in einem Stil */
input[type="checkbox"],
.form-check-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #40444b;
    cursor: pointer;
    position: relative;
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}

input[type="checkbox"]:focus,
.form-check-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
    outline: none;
}

input[type="checkbox"]:checked,
.form-check-input:checked {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

input[type="checkbox"]::after,
.form-check-input::after {
    content: "";
    position: absolute;
    display: block;
    top: 2px;
    left: 4px;
    width: 6px;
    height: 10px;
    border: solid black;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity .2s;
}

input[type="checkbox"]:checked::after,
.form-check-input:checked::after {
    opacity: 1;
}

/* Toggle Switch (optisch) */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.toggle-switch input[type="checkbox"] {
    appearance: none;
    width: 46px;
    height: 24px;
    background: #666;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background-color .3s;
}

.toggle-switch input[type="checkbox"]::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: transform .3s;
}

.toggle-switch input[type="checkbox"]:checked {
    background: var(--accent-color);
}

.toggle-switch input[type="checkbox"]:checked::before {
    transform: translateX(22px);
}

.toggle-switch .toggle-label {
    font-size: var(--label-font-size);
    color: var(--text-color);
    user-select: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.form-group-horizontal {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.form-group-horizontal input[type="checkbox"] {
    flex: 0 0 auto;
}

.form-group-horizontal label {
    flex: 1;
    margin: 0;
}

/* Light Mode Forms */
body.light-mode input[type="text"],
body.light-mode input[type="password"],
body.light-mode input[type="number"],
body.light-mode input[type="email"],
body.light-mode input[type="time"],
body.light-mode input[type="date"],
body.light-mode textarea,
body.light-mode select {
    background: #e0e0e0;
    border: 1px solid #999;
    color: var(--text-color);
}

body.light-mode select {
    background-image: url("data:image/svg+xml,%3Csvg fill='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
}

body.light-mode input[type="checkbox"],
body.light-mode .form-check-input {
    background: #e0e0e0;
    border: 1px solid #999;
}

body.light-mode input[type="checkbox"]:checked,
body.light-mode .form-check-input:checked {
    background: #f5f5b5;
    border-color: var(--accent-color);
}

body.light-mode input[type="checkbox"]::after,
body.light-mode .form-check-input::after {
    border-color: var(--accent-color);
}

/* ===========================
   LOGIN / INFO CARDS
   =========================== */
.login-screen {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
}

.login-box {
    background: var(--secondary-bg-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, .6);
    text-align: center;
    width: 300px;
    color: #fff;
}

.login-box h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
}

.login-box input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: none;
    border-radius: 6px;
    background: #40444b;
    color: var(--text-color);
    font-size: 16px;
}

.login-box button {
    width: 100%;
    padding: 10px;
    background: var(--accent-color);
    border: none;
    border-radius: 6px;
    color: black;
    font-weight: bold;
    cursor: pointer;
    transition: background-color .2s;
}

.login-box button:hover {
    background: #d4d400;
}

.login-error {
    background: rgba(255, 0, 0, .2);
    color: #ff5555;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

body.light-mode .login-box input {
    background: #ddd;
    color: var(--text-color);
}

body.light-mode .login-box input::placeholder {
    color: var(--text-muted-color);
}

.info-card {
    transition: transform .1s, box-shadow .2s;
    cursor: pointer;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}

.info-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

/* ===========================
   PRODUCTS
   =========================== */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.product-card {
    flex: 1 1 420px;
    max-width: 500px;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--card-bg, #222);
    border-radius: var(--card-radius-global);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    overflow: hidden;
    transition: transform .2s;
}

.product-card:hover {
    transform: scale(1.02);
}

.product-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.product-content {
    padding: var(--card-padding-global);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.product-content h2 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.3rem;
}

.product-content p {
    margin: 0;
    color: #ccc;
    line-height: 1.4;
    font-size: .95rem;
}

/* ===========================
   DECENT BOXEN (Settings/Logs)
   =========================== */
.decent-box {
    position: relative;
    max-width: var(--decent-box-max-width);
    background: var(--secondary-bg-color);
    padding: var(--content-padding);
    border-radius: var(--card-radius-global);
    box-shadow: 0 0 10px rgba(0, 0, 0, .4);
    margin: 30px auto;
    color: var(--text-color);
    transition: background-color .3s, color .3s;
    overflow: auto;
    resize: horizontal;
    /* optisch – eigenes Resize-Handling im JS */
}

.decent-box h2,
.decent-box h3 {
    color: var(--accent-color);
    transition: color .3s;
}

.decent-box h2 {
    text-align: center;
    margin-bottom: 20px;
}

.decent-box h3 {
    margin-bottom: 8px;
}

.decent-box p,
.decent-box ul {
    color: var(--text-color);
    line-height: 1.5;
    transition: color .3s;
}

.decent-box ul {
    padding-left: 20px;
    list-style: disc;
}

.decent-box-resizer {
    position: absolute;
    width: 16px;
    height: 16px;
    bottom: 4px;
    right: 4px;
    cursor: se-resize;
    background: var(--accent-color);
    border-radius: 4px;
    opacity: .6;
    transition: opacity .2s;
    display: none;
}

.decent-box-resizer:hover {
    opacity: 1;
}

body.light-mode .decent-box {
    background: #e0e0e0;
    color: var(--text-color);
}

/* ===========================
   FOOTER
   =========================== */
footer {
    position: fixed;
    left: 0;
    right: 0;
    /* sitzt direkt über dem Splitter und „fährt“ mit dem Log mit */
    bottom: calc(var(--log-height) + var(--splitter-height) + env(safe-area-inset-bottom, 0px) - 10px);

    height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: none;
    box-shadow: none;
    z-index: 42068;
    /* unterhalb des Splitters (42070), über Content */
    pointer-events: auto;
    /* Links anklickbar */

    width: auto;
    color: var(--text-color);
    font-size: 14px;
}

footer .footer-text {
    display: inline-block;
    padding: 1px 3px;
    border-radius: 1px;
    background: rgba(0, 0, 0, .20);
    backdrop-filter: blur(2px);
    color: var(--text-color);
    font-size: 12px;
    line-height: 1.3;
    text-decoration: none;
}

body.light-mode footer .footer-text {
    background: rgba(255, 255, 255, .30);
    color: #333;
}

/* --- Footer Links angleichen --- */
footer a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
}

footer a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

body.light-mode footer a {
    color: #333;
}

body.light-mode footer a:hover {
    color: var(--accent-color);
}

/* ===========================
   LOG + SPLITTER
   =========================== */
#log {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: var(--log-height);
    overflow-y: auto;
    overflow-x: hidden;
    background: #000;
    color: #fff;
    font-family: monospace;
    font-size: 14px;
    margin: 0;
    padding: 0 env(safe-area-inset-right) calc(env(safe-area-inset-bottom)) env(safe-area-inset-left);
    z-index: 42069;
}

#log-splitter {
    position: fixed;
    left: 0;
    width: 100%;
    height: var(--splitter-height);
    bottom: calc(var(--log-height) - 3px + env(safe-area-inset-bottom));
    cursor: ns-resize;
    user-select: none;
    touch-action: none;
    z-index: 42070;
    background: transparent;
    pointer-events: auto;
}

#log-splitter::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
    opacity: .85;
    pointer-events: none;
}

/* ===========================
   CONFIRM MODAL
   =========================== */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.confirm-modal {
    background: var(--secondary-bg-color);
    padding: 24px 32px;
    border-radius: 12px;
    box-shadow: 0 0 18px rgba(0, 0, 0, .5);
    text-align: center;
    max-width: 420px;
    width: 90%;
    color: var(--text-color);
    animation: fadeInModal .3s ease-out;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: scale(.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.confirm-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
}

.confirm-text {
    font-size: 16px;
    margin-bottom: 20px;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.confirm-buttons button {
    flex: 1;
    padding: 10px 14px;
    font-size: 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    min-width: 100px;
}

/* ===========================
   SCROLLBARS
   =========================== */
/* WebKit */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, .4);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(128, 128, 128, .6);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(128, 128, 128, .4) transparent;
}

@media (max-width: 900px),
(hover: none) and (pointer: coarse) {
    html:not([data-menu]) {
        --sidebar-x: var(--sidebar-width);
        /* Sidebar außerhalb vom View */
    }
}

/* dezente „Riffel“-Optik */
#mobile-sidebar-grabber::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    width: 6px;
    height: 28px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .35);
    opacity: .8;
}

/* nur auf echten Touch-Geräten relevant */
@media (hover: none) and (pointer: coarse) {
    #mobile-sidebar-grabber {
        touch-action: none;
    }
}

/* === Mobile Sidebar Grabber === */
#mobile-sidebar-grabber {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    /* größer, ragt rein */
    height: 120px;
    border-radius: 8px 0 0 8px;
    background: var(--accent-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
    z-index: 420420;
    /* über Content, unter Debug-Overlays */
    cursor: pointer;
    display: none;
    /* JS steuert sichtbar/unsichtbar */
    touch-action: manipulation;
}

#mobile-sidebar-grabber::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    border-radius: 4px;
    opacity: .45;
    background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .28));
}

/* Desktop nie anzeigen */
@media (hover: hover) and (pointer: fine) {
    #mobile-sidebar-grabber {
        display: none !important;
    }
}

/* ========== Mobile pinned (collapsed) – nur Icons anzeigen ========== */
/* Gilt für gesamte Sidebar, inkl. Bottom-Area */
body.sidebar-pinned-mobile #sidebar.collapsed .nav-link,
body.sidebar-pinned-mobile #sidebar.collapsed .sidebar-button {
    justify-content: center;
    /* Icon zentrieren */
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

/* Textlabel ausblenden (robust für verschiedene Markups) */
body.sidebar-pinned-mobile #sidebar.collapsed .nav-link .label,
body.sidebar-pinned-mobile #sidebar.collapsed .sidebar-button .label,
body.sidebar-pinned-mobile #sidebar.collapsed .nav-link>span:not(.count):not(.badge):not(.caret),
body.sidebar-pinned-mobile #sidebar.collapsed .sidebar-button>span:not(.count):not(.badge):not(.caret),
body.sidebar-pinned-mobile #sidebar.collapsed .bottom-area .nav-link>span:not(.count):not(.badge):not(.caret) {
    display: none !important;
}

/* Falls du getrennte Container hast: Bottom-Area explizit mitnehmen */
body.sidebar-pinned-mobile #sidebar.collapsed .bottom-area .nav-link,
body.sidebar-pinned-mobile #sidebar.collapsed .bottom-area .sidebar-button {
    justify-content: center;
}

/* Optionale Optik: Breite im collapsed Zustand schmal halten */
body.sidebar-pinned-mobile #sidebar.collapsed {
    width: var(--sidebar-collapsed);
    /* nutzt deine COLLAPSED_PX */
    min-width: var(--sidebar-collapsed);
}

/* Tooltips via title sollen normal funktionieren; Cursor-Hinweis: */
body.sidebar-pinned-mobile #sidebar.collapsed .nav-link,
body.sidebar-pinned-mobile #sidebar.collapsed .sidebar-button {
    cursor: pointer;
}

/* ---------------- Mobile: pinned + collapsed ---------------- */

/* Nur die Labels von Links/Buttons verstecken (Bottom + normale Links) */
body.sidebar-pinned-mobile #sidebar.collapsed .nav-link .sidebar-label,
body.sidebar-pinned-mobile #sidebar.collapsed .sidebar-bottom .sidebar-button>span {
    display: none !important;
}

/* Trenner/Section-Titles im pinned Mode IMMER anzeigen */
body.sidebar-pinned-mobile #sidebar.collapsed .nav-section-title {
    display: block !important;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.85;
    padding: 0.35rem 0.2rem;
    margin: 0.25rem 0.4rem;
    white-space: normal;
    /* falls Titel länger ist */
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    /* optional feine Linie */
}

/* Optional: erstes Section-Title ohne Linie */
body.sidebar-pinned-mobile #sidebar.collapsed .sidebar-scrollable .nav-section-title:first-of-type {
    border-top: none;
}

/* Icons zentrieren, damit die Trenner mittig wirken */
body.sidebar-pinned-mobile #sidebar.collapsed .nav-link,
body.sidebar-pinned-mobile #sidebar.collapsed .sidebar-bottom .sidebar-button {
    justify-content: center;
    padding-left: .35rem;
    padding-right: .35rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    margin-top: 10px;
    background: #333a45;
    border: 1px solid #465164;
    color: #e7eaf0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary:hover {
    filter: brightness(1.05);
}

.btn-secondary:active {
    transform: translateY(1px);
}

/* gleiche Optik wie .btn-modern, nur Abstände */
.btn-register-below {
    margin-top: 10px;
    width: 100%;
}

.login-box .btn-modern+.btn-modern {
    margin-top: 10px;
}

/* ========== COLLAPSED / PINNED SIDEBAR ========== */
/* Text in Links & Footer vollständig ausblenden */
#sidebar.collapsed .nav-link span,
#sidebar.collapsed .nav-link .label,
#sidebar.collapsed .nav-group-title,
#sidebar.collapsed .sidebar-footer span,
#sidebar.collapsed .sidebar-footer .label,
#sidebar.collapsed #sidebar-language-text,
/* Sprach-Label */
#sidebar.collapsed #logout-button span {
    /* Text im Logout-/Login-Button */
    display: none !important;
}

/* Icons sauber zentrieren, keine „Rest“-Einrückung */
#sidebar.collapsed .nav-link,
#sidebar.collapsed .sidebar-footer .btn,
#sidebar.collapsed .sidebar-footer button,
#sidebar.collapsed .sidebar-footer a {
    justify-content: center !important;
    padding-right: 0 !important;
}

/* Footer im schmalen Modus kompakter halten */
#sidebar.collapsed .sidebar-footer {
    padding-inline: 8px;
}

/* Optional: falls du eine feste collapsed-Breite nutzt */
:root {
    --sidebar-collapsed-width: 72px;
    /* anpassen, falls nötig */
}

#sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    min-width: var(--sidebar-collapsed-width);
}

/* ==== SIDEBAR COLLAPSED – EINHEITLICH & ZENTRIERT (DESKTOP) ==== */
/* Einheitliche Breite im collapsed Zustand (nur 1 Variable verwenden) */
:root {
    --sidebar-collapsed-width: 84px;
    /* ggf. 80–96px nach Geschmack */
}

/* Breite anwenden (überschreibt frühere Regeln/Variablen) */
#sidebar.collapsed {
    width: var(--sidebar-collapsed-width) !important;
    min-width: var(--sidebar-collapsed-width) !important;
    max-width: var(--sidebar-collapsed-width) !important;
}

/* Desktop: KEINE Transition beim Collapsen */
@media (hover:hover) and (pointer:fine) {
    #sidebar {
        transition: none !important;
    }
}

/* Mobile Overlay darf weiter weich ein-/ausfahren */
@media (hover:none) and (pointer:coarse) {
    html[data-menu] #sidebar {
        transition: transform 240ms cubic-bezier(.22, .61, .36, 1) !important;
    }
}

/* Textlabels im collapsed vollständig verstecken (oben & unten) */
#sidebar.collapsed .nav-link span,
#sidebar.collapsed .nav-link .label,
#sidebar.collapsed .nav-group-title,
#sidebar.collapsed .sidebar-bottom .sidebar-button>span,
#sidebar.collapsed #sidebar-language-text,
#sidebar.collapsed #logout-button span {
    display: none !important;
}

/* Icons + Buttons mittig ausrichten (auch Bottom-Bereich) */
#sidebar.collapsed .nav-link,
#sidebar.collapsed .sidebar-bottom .sidebar-button {
    display: flex;
    justify-content: center !important;
    align-items: center;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Icon selbst wirklich zentrieren (kein Rest-Margin) */
#sidebar.collapsed .nav-link .sidebar-icon {
    margin: 0 !important;
    width: 32px;
    height: 32px;
}

/* Logo im collapsed Zustand sauber zentrieren */
#sidebar.collapsed .sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 0;
}

#sidebar.collapsed .sidebar-logo img {
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    object-fit: contain;
}

/* === Schöne & zentrierte Suchleiste (Products) ==================== */
/* Container zentriert den Input horizontal */
.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 12px 0;
    width: 100%;
}

/* Input selbst: moderner Pill-Look + Lupe als Hintergrund-Icon */
.search-bar input[type="search"],
.search-bar input[type="text"],
#pg-search {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 520px;
    height: 44px;
    padding: 0 44px 0 44px;
    /* Platz für das Icon links */
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 9999px;
    /* Pill-Form */
    background: rgba(255, 255, 255, .06);
    color: inherit;
    outline: none;
    transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
    font-size: 15px;

    /* Lupe als BG-Icon */
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='7' stroke='white' stroke-opacity='.8' stroke-width='2'/%3E%3Cpath d='M20 20L17 17' stroke='white' stroke-opacity='.8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px 50%;
    background-size: 18px 18px;
}

/* Platzhalter & Interaktionen */
.search-bar input::placeholder,
#pg-search::placeholder {
    color: rgba(255, 255, 255, .55);
}

.search-bar input:hover,
#pg-search:hover {
    background: rgba(255, 255, 255, .08);
}

.search-bar input:focus,
#pg-search:focus {
    border-color: rgba(255, 255, 255, .28);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .09);
}

/* Optional: nur auf der Products-Seite etwas Puffer zum Grid */
body.products-page .search-bar {
    margin-bottom: 14px;
}

/* login-screen ist per Default unsichtbar */
#login-screen {
    display: none;
}

/* optional: barrierearm steuern */
#login-screen[aria-hidden="false"] {
    display: flex;
    /* deine gewünschte Darstellung */
}

/* === Buttons: no glow, accent background, dark text === */

/* Basis-Token (falls noch nicht vorhanden) */
:root {
    --accent-500: #f7b500;
    /* deine Akzentfarbe */
    --accent-600: #e1a300;
}

/* Dark-Mode: Buttons in Akzentfarbe mit schwarzer Schrift */
body.dark-mode button,
body.dark-mode .button,
body.dark-mode .btn,
body.dark-mode input[type="button"],
body.dark-mode input[type="submit"] {
    border: 1px solid transparent;
    box-shadow: none !important;
    text-shadow: none !important;
    outline: none;
}

body.dark-mode button:hover:not(.chip) {
    background: var(--accent-600);
    color: black;
}

/* Active-Buttons global – Chips explizit ausnehmen */
button.active:not(.chip) {
    background: var(--accent-color);
    color: #fff;
}

body.dark-mode button:active,
body.dark-mode .button:active,
body.dark-mode .btn:active,
body.dark-mode input[type="button"]:active,
body.dark-mode input[type="submit"]:active {
    transform: translateY(0.5px);
}

/* Focus: klare, schmale Outline statt Glow */
body.dark-mode button:focus-visible,
body.dark-mode .button:focus-visible,
body.dark-mode .btn:focus-visible,
body.dark-mode input[type="button"]:focus-visible,
body.dark-mode input[type="submit"]:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
    box-shadow: none !important;
}

/* Falls irgendwo künstliche Glow-Layer genutzt wurden */
button::before,
button::after,
.btn::before,
.btn::after,
.button::before,
.button::after {
    box-shadow: none !important;
    filter: none !important;
    display: none !important;
    /* nur wenn du wirklich Glow-Pseudo-Elemente hattest */
}

/* Optional: Light-Mode (falls du dort weiterhin neutrale Buttons willst) */
body.light-mode .btn-primary,
body.light-mode button.primary {
    background: var(--accent-500);
    color: #111;
    border-color: transparent;
    box-shadow: none;
}

/* ===== Select/Option Normalisierung ===== */

/* Basis: alles erbt wie normale Textelemente */
body select,
body option,
body optgroup {
    font-family: inherit;
    font-size: var(--select-font-size, 14px);
    line-height: 1.2;
}

/* Optik des Select-Felds angleichen */
body select {
    color: inherit;
    background-color: var(--surface-2, #1f2429);
    border: 1px solid var(--border, #33383f);
    border-radius: 8px;
    padding: 6px 32px 6px 10px;
    height: 36px;
    /* natives Styling etwas neutralisieren */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-repeat: no-repeat, no-repeat;
    background-position: right 10px center, right 10px center;
    background-size: 14px 14px, 14px 14px;
}

/* Fokus sichtbar aber dezent */
body select:focus {
    outline: none;
    border-color: var(--primary, #f7b500);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary, #f7b500) 25%, transparent);
}

/* Light/Dark Kontraste */
body.light-mode select {
    background-color: var(--surface-2, #f4f6f8);
    border-color: var(--border, #d5d9df);
    color: var(--text, #0e1116);
}

body.dark-mode select {
    background-color: var(--surface-2, #1f2429);
    border-color: var(--border, #323840);
    color: var(--text, #e9edf2);
}

/* Kleinere/kompakte Variante (optional per Klasse) */
.select-sm {
    --select-font-size: 13px;
}

.select-lg {
    --select-font-size: 15px;
    height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* iOS/kleine Screens: >=16px verhindert Auto-Zoom beim Fokus */
@media (max-width: 900px),
(hover: none) and (pointer: coarse) {
    :root {
        --select-font-size: 16px;
    }
}

/* Für deine spezifischen Seiten, falls nötig etwas mehr Gewicht: */
#content-area select,
.orders-page select,
.print_request-page select {
    font-size: var(--select-font-size, 14px);
}

#btn-register-cancel {
    margin-top: 0.5rem;
}

#sidebar {
    overflow-x: hidden;
}

/* zusätzlich zur bestehenden Regel */
#sidebar .nav {
    overflow-x: hidden;
}

/* deine Scroll-Spalte */
.sidebar-scrollable {
    overflow-x: hidden;
}

/* Abschnitt im unteren Teil */

#sidebar .nav-link {
    width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Login: Benutzername wie Passwort stylen (inkl. Autofill-Fix) */
.login-box input[type="text"],
.login-box input[type="password"] {
    background: #1f2126 !important;
    /* gleich dunkel wie Passwort */
    color: var(--text-color);
    border: 1px solid #2e343d;
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, .2);
}

/* Fokus konsistent */
.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent-color) 25%, transparent);
    outline: none;
}

/* Platzhalter dezent */
.login-box input::placeholder {
    color: var(--text-muted-color);
}

/* Browser-Autofill überschreiben (Chrome/Safari) */
.login-box input:-webkit-autofill,
.login-box input:-webkit-autofill:hover,
.login-box input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-color);
    box-shadow: 0 0 0 1000px #1f2126 inset !important;
    border: 1px solid #2e343d;
    transition: background-color 9999s ease-in-out 0s;
}

/* Light-Mode: Passwort wie Benutzername stylen */
body.light-mode .login-box input[type="password"] {
    background: #e0e0e0 !important;
    /* wie Benutzername */
    border: 1px solid #999 !important;
    color: var(--text-color) !important;
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, .1);
}

/* Fokus-Ring identisch */
body.light-mode .login-box input[type="password"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent-color) 25%, transparent);
    outline: none;
}

/* Platzhalter-Farbe wie beim Benutzername-Feld */
body.light-mode .login-box input[type="password"]::placeholder {
    color: var(--text-muted-color);
}

/* Autofill (Chrome/Safari) angleichen */
body.light-mode .login-box input[type="password"]:-webkit-autofill,
body.light-mode .login-box input[type="password"]:-webkit-autofill:hover,
body.light-mode .login-box input[type="password"]:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-color);
    box-shadow: 0 0 0 1000px #e0e0e0 inset !important;
    border: 1px solid #999;
    transition: background-color 9999s ease-in-out 0s;
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent-color, #f5b301);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 6px;
    font-size: 0.95rem;
    padding: 4px 0;
    transition: opacity 0.2s ease;
}

.btn-link:hover {
    opacity: 0.85;
}

/* Log-Trenner kompakter */
#log .log-divider,
#log hr.log-divider {
    margin: 0px 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 1);
    height: 0;
}

/* Gelben Shadow komplett entfernen (Buttons & aktive Links) */
#sidebar .nav-link.active,
#sidebar .sidebar-button.active,
.nav-link.active,
button,
.btn,
.button,
.btn-modern,
.btn-small {
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Falls irgendwo noch explizit ein gelber inset-shadow gesetzt war: aushebeln */
#sidebar .nav-link.active,
.nav-link.active {
    /* bleibt gelb hinterlegt, aber ohne Glow */
    box-shadow: none !important;
}

/* Sicherheitshalber: keine Button-Glows global */
button:focus-visible,
.btn:focus-visible,
.button:focus-visible {
    outline: 2px solid rgba(0, 0, 0, .75);
    outline-offset: 2px;
    box-shadow: none !important;
}

/* Login: "Abbrechen" im Light-Mode */
body.light-mode .login-box .btn-secondary {
    background: var(--accent-color);
    /* helles Grau/Blau wie die Card */
    border-color: #c7cdd6;
    color: var(--primary-bg-color);
}

body.light-mode .login-box .btn-secondary:hover {
    background: var(--accent-color);
    border-color: #b9c0cb;
    color: var(--primary-bg-color);
}

body.light-mode .login-box .btn-secondary:active {
    transform: translateY(1px);
}

/* ---- Mobile Sidebar-Grabber: NUR Light-Mode hellgrau mit schwarzen Akzenten ---- */
@media (hover: none) and (pointer: coarse) {
    body.light-mode #mobile-sidebar-grabber {
        background: #e6e6e6 !important;
        /* hellgrau */
        border: 1px solid rgba(0, 0, 0, .35) !important;
        /* dunkler Rand */
        box-shadow: 0 2px 10px rgba(0, 0, 0, .25) !important;
    }

    /* Griff-Riffel dunkel, statt gelb */
    body.light-mode #mobile-sidebar-grabber::after {
        content: "";
        position: absolute;
        left: 8px;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        height: 40px;
        border-radius: 4px;
        opacity: .75;
        background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .85)) !important;
    }

    /* optionales Feedback */
    body.light-mode #mobile-sidebar-grabber:hover {
        filter: brightness(0.98);
    }

    body.light-mode #mobile-sidebar-grabber:active {
        transform: translateY(1px);
    }
}

/* ===== Light-Mode: Startseiten-Suche (home-search) klar sichtbar ===== */
body.light-mode .home-search input[type="search"] {
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, .22) !important;
    color: #0e1116 !important;
    height: 44px;
    border-radius: 999px;
    padding: 0 14px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
}

body.light-mode .home-search input[type="search"]::placeholder {
    color: rgba(0, 0, 0, .45);
}

body.light-mode .home-search input[type="search"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent-color) 25%, transparent);
    background: #fff;
}

/* ===========================
   RESPONSIVE SIZE-TUNING
   =========================== */

/* Tablet / schmale Laptops */
@media (max-width: 1200px) {
    :root {
        --font-size-base: 15px;
        --font-size-small: 13px;
        --font-size-heading: 22px;
        --font-size-heading-large: 26px;

        --content-padding: 16px;
        --card-radius-global: 10px;
        --card-padding-global: 14px;

        --sidebar-font-size: 14px;
        --input-font-size: 16px;
        --button-font-size: 15px;
        --button-height: 42px;
    }

    .product-card {
        flex: 1 1 360px;
    }
}

/* Smartphones / schmale Viewports */
@media (max-width: 900px) {
    :root {
        --font-size-base: 14px;
        --font-size-small: 12px;
        --font-size-heading: 20px;
        --font-size-heading-large: 24px;

        --content-padding: 12px;
        --card-radius-global: 10px;
        --card-padding-global: 12px;

        --sidebar-font-size: 13px;
        --input-font-size: 16px;
        --button-font-size: 15px;
        --button-height: 40px;
    }

    .product-grid {
        gap: 1.2rem;
    }

    .product-card {
        flex: 1 1 100%;
        max-width: 420px;
    }

    .decent-box {
        margin: 16px auto;
    }

    .login-box {
        width: 90%;
        max-width: 320px;
        padding: 20px;
    }
}

/* sehr kleine Smartphones */
@media (max-width: 600px) {
    :root {
        --font-size-base: 13px;
        --font-size-small: 11px;
        --font-size-heading: 19px;
        --font-size-heading-large: 22px;

        --content-padding: 10px;
        --card-radius-global: 8px;
        --card-padding-global: 10px;

        --sidebar-font-size: 12px;
        --button-font-size: 14px;
        --button-height: 38px;
    }

    #content-area h2 {
        margin-bottom: 14px;
    }

    .product-card {
        max-width: 100%;
    }
}