/* ============================================
   ZENTRALES MENÜ – GLOBAL FÜR ALLE SEITEN
   Diese Datei definiert das Menü für ALLE Seiten identisch.
   KEINE lokalen Styles dürfen diese überschreiben.

   PP-304: Das Menü hängt im Seitenkopf (#menu-placeholder in <header>) und
   erbt damit Kopf- und Modul-Styles (`header a`, `.btn`, `h3` …). Statt
   !important-Schutzblöcken bindet jede Regel an die IDs #menu-placeholder
   bzw. #menu-sidebar: eine ID schlägt jeden Klassen- oder Element-Selektor
   der Module, unabhängig von der Ladereihenfolge. !important steht nur noch
   an den Layout-Regeln für `.container`, die Modul-Layouts überstimmen müssen.
   ============================================ */

:root {
    --menu-sidebar-width: 288px;
    --menu-rail-width: 72px;
    --menu-page-transition: 0.18s ease;
    /* Höhe der Bottom-Navigation am Handy (ohne Safe-Area) */
    --bottom-nav-h: 64px;
}

/* ---------- Platzhalter + Toggle im Seitenkopf ---------- */
#menu-placeholder {
    flex: 0 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#menu-placeholder .menu-container {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    box-sizing: border-box;
}

#menu-placeholder .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: var(--header-text-muted, var(--text-muted, #555555));
    font-size: 24px;
    line-height: 1;
    /* Glas-Kapsel wie die Kopf-Buttons (theme.css, PP-311) */
    background: var(--header-chip-bg, transparent);
    border: 1px solid var(--header-chip-border, transparent);
    border-radius: var(--r-pill, 999px);
    box-shadow: var(--header-chip-shadow, none);
    cursor: pointer;
    transition: background 0.2s;
}

#menu-placeholder .menu-toggle:hover {
    color: var(--header-text, var(--text, #161616));
    background: var(--header-chip-bg-hover, var(--surface));
}

#menu-placeholder .menu-toggle .menu-icon-svg {
    width: 22px;
    height: 22px;
}

/* ---------- Overlay (Handy/Tablet) ---------- */
#menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: var(--modal-scrim, rgba(22, 22, 22, 0.55));
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ---------- Sidebar ---------- */
/* Typografie wird hier einmal festgelegt und vererbt – nicht vom Seitenkopf
   (weiße Schrift, zentriert, andere Zeilenhöhe) übernehmen. */
#menu-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    width: var(--menu-sidebar-width);
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    background: var(--surface, #fff);
    color: var(--text, #161616);
    font-family: var(--font, 'Open Sans', Arial, sans-serif);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
    /* Schatten erst im geöffneten Zustand – sonst blutet er vom ausgeblendeten Menü ins Bild */
    box-shadow: none;
    transform: translateX(-100%);
    transition: transform 0.3s ease, width var(--t, .18s);
}

/* Nicht auf einen globalen Reset der Module verlassen (nicht jede Seite hat einen) */
#menu-sidebar *,
#menu-sidebar *::before,
#menu-sidebar *::after {
    box-sizing: border-box;
}

#menu-sidebar.active {
    transform: translateX(0);
    box-shadow: var(--elev-3, 0 20px 44px rgba(22, 22, 22, 0.16));
}

#menu-sidebar .menu-icon-svg {
    display: block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* ---------- Menükopf ---------- */
/* Gleiches getöntes Glas wie der Seitenkopf (PP-311); min-height = Seiten-Kopfzeile
   (theme.css), damit Tönung und Linie bündig durchlaufen */
#menu-sidebar .menu-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: var(--shell-header-h, 0px);
    padding: 12px 12px 12px 20px;
    box-sizing: border-box;
    background: var(--header-glass-bg, var(--surface, #fff));
    -webkit-backdrop-filter: var(--header-glass-blur, none);
    backdrop-filter: var(--header-glass-blur, none);
    border-bottom: 1px solid var(--header-glass-border, var(--border, #e6e6e6));
    box-shadow: var(--header-glass-edge, none);
    color: var(--header-text, var(--text, #161616));
}

#menu-sidebar .menu-header h3 {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--header-text, var(--text, #161616));
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#menu-sidebar .menu-header-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 2px;
}

/* Kopf-Buttons: Suche, Hell/Dunkel, Icon-Leiste, Schließen */
#menu-sidebar .menu-header-btn,
#menu-sidebar .menu-theme-toggle,
#menu-sidebar .menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-height: 0;
    margin: 0;
    padding: 0;
    color: var(--header-text-muted, var(--text-muted, #555555));
    background: none;
    border: 1px solid transparent;
    border-radius: var(--r-pill, 999px);
    box-shadow: none;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

#menu-sidebar .menu-header-btn:hover,
#menu-sidebar .menu-theme-toggle:hover,
#menu-sidebar .menu-close:hover {
    color: var(--header-text, var(--text, #161616));
    background: var(--header-chip-bg-hover, var(--surface));
    border-color: var(--header-chip-border, transparent);
    box-shadow: var(--header-chip-shadow, none);
}

#menu-sidebar .menu-header-btn .menu-icon-svg,
#menu-sidebar .menu-theme-toggle .menu-icon-svg,
#menu-sidebar .menu-close .menu-icon-svg {
    width: 20px;
    height: 20px;
}

/* Icon-Leiste gibt es nur mit fester Desktop-Sidebar */
#menu-sidebar .menu-rail-toggle { display: none; }

/* ---------- Navigation ---------- */
#menu-sidebar .menu-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    margin: 0;
    padding: 4px 0 12px;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Sektionstitel als Auf/Zu-Schalter (PP-304) */
#menu-sidebar .menu-section-title {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: calc(100% - 16px);
    min-height: 0;
    margin: 12px 8px 2px;
    padding: 6px 12px;
    box-sizing: border-box;
    color: var(--text-muted, #555555);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
    background: none;
    border: none;
    border-radius: var(--r-xs, 6px);
    box-shadow: none;
    cursor: pointer;
}

#menu-sidebar .menu-section:first-child .menu-section-title { margin-top: 8px; }

#menu-sidebar .menu-section-title:hover { color: var(--text, #161616); }

#menu-sidebar .menu-section-chevron {
    flex-shrink: 0;
    transition: transform var(--t, .18s);
}

#menu-sidebar .menu-section.is-collapsed .menu-section-chevron { transform: rotate(-90deg); }

#menu-sidebar .menu-section.is-collapsed .menu-section-items { display: none; }

/* Einträge: abgerundete Fläche mit Abstand zum Rand (v2) */
#menu-sidebar .menu-item {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    align-items: center;
    gap: 12px;
    width: calc(100% - 16px);
    height: auto;
    min-height: 0;
    margin: 1px 8px;
    padding: 12px 12px;
    box-sizing: border-box;
    color: var(--text, #161616);
    font-family: inherit;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: normal;
    text-align: left;
    text-decoration: none;
    text-transform: none;
    background: none;
    border: none;
    border-radius: var(--r-sm, 10px);
    box-shadow: none;
    outline-offset: -2px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

#menu-sidebar .menu-item:hover {
    color: var(--text, #161616);
    background: color-mix(in srgb, var(--text, #161616) 6%, transparent);
}

/* Aktiv: zarte Markenfläche + roter Balken links, Text bleibt neutral */
#menu-sidebar .menu-item.menu-item-active {
    color: var(--text, #161616);
    font-weight: 600;
    background: var(--brand-50, #fff0f0);
}

#menu-sidebar .menu-item.menu-item-active::before {
    content: "";
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 3px;
    border-radius: var(--r-pill, 999px);
    background: var(--brand-500, #fe0000);
}

#menu-sidebar .menu-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 20px;
    min-width: 20px;
    margin: 0;
    padding: 0;
    color: var(--text-muted, #555555);
    line-height: 1;
}

#menu-sidebar .menu-item:hover .menu-icon { color: var(--text, #161616); }
#menu-sidebar .menu-item.menu-item-active .menu-icon { color: var(--brand-500, #fe0000); }

#menu-sidebar .menu-text {
    display: block;
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: inherit;
    font-size: 14px;
    font-weight: inherit;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Hinweis: SMTP / Shop-Anbindung noch nicht konfiguriert */
#menu-sidebar .menu-item.menu-item-config-missing {
    background: var(--danger-bg, #fee2e2);
}

#menu-sidebar .menu-item.menu-item-config-missing:hover,
#menu-sidebar .menu-item.menu-item-config-missing.menu-item-active {
    background: color-mix(in srgb, var(--danger, #dc2626) 18%, var(--danger-bg, #fee2e2));
}

/* Anstehende Feuerwerk-Checklisten (gelbe Schnellzugriffe oben) */
@keyframes menu-checklist-breath {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

#menu-sidebar .menu-item.menu-item-checklist {
    color: var(--warning-on);
    font-weight: 600;
    background: var(--warning);
    animation: menu-checklist-breath 2s ease-in-out infinite;
}

#menu-sidebar .menu-item.menu-item-checklist:first-child { margin-top: 8px; }

#menu-sidebar .menu-item.menu-item-checklist .menu-icon { color: inherit; }

#menu-sidebar .menu-item.menu-item-checklist:hover,
#menu-sidebar .menu-item.menu-item-checklist.menu-item-active {
    color: var(--warning-on);
    background: var(--warning-text);
}

@media (prefers-reduced-motion: reduce) {
    #menu-sidebar .menu-item.menu-item-checklist {
        animation: none;
        opacity: 1;
    }
}

/* Offene Aufgaben unter Versandarten (PP-358): Gelb blendet ein und aus.
   Ohne 0 %/100 %-Schritt: Anfang und Ende behalten den normalen Zustand
   (aktiv, Hover), die Markierung der geöffneten Seite bleibt also sichtbar. */
@keyframes menu-attention-fade {
    50% { color: var(--warning-on); background-color: var(--warning-grad, var(--warning)); }
}

@keyframes menu-attention-icon {
    50% { color: var(--warning-on); }
}

#menu-sidebar .menu-item.menu-item-attention {
    animation: menu-attention-fade 2s ease-in-out infinite;
}

#menu-sidebar .menu-item.menu-item-attention .menu-icon {
    animation: menu-attention-icon 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    #menu-sidebar .menu-item.menu-item-attention,
    #menu-sidebar .menu-item.menu-item-attention .menu-icon {
        animation: none;
        color: var(--warning-text);
    }

    #menu-sidebar .menu-item.menu-item-attention { background: var(--warning-bg); }
}

/* ---------- Arbeitszeit-Widget + Benutzerblock unten ---------- */
#menu-sidebar .menu-az-section { flex-shrink: 0; }
#menu-sidebar .menu-az-section:not(:empty) { border-top: 1px solid var(--border, #e6e6e6); }

#menu-sidebar .menu-user {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 4px;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    background: var(--surface-2, #fafafa);
    border-top: 1px solid var(--border, #e6e6e6);
}

#menu-sidebar .menu-user-link {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 6px 8px;
    color: var(--text, #161616);
    font: inherit;
    text-align: left;
    background: none;
    border: none;
    border-radius: var(--r-sm, 10px);
    box-shadow: none;
    cursor: pointer;
}

#menu-sidebar .menu-user-link:hover {
    background: color-mix(in srgb, var(--text, #161616) 6%, transparent);
}

#menu-sidebar .menu-user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#menu-sidebar .menu-user-name,
#menu-sidebar .menu-user-roles {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#menu-sidebar .menu-user-name {
    color: var(--text, #161616);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

#menu-sidebar .menu-user-roles {
    color: var(--brand-600, #d00000);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .08em;
    text-transform: uppercase;
}

#menu-sidebar .menu-user .menu-logout-btn {
    width: 44px;
    height: 44px;
    color: var(--text-muted, #555555);
}

#menu-sidebar .menu-user .menu-logout-btn:hover {
    color: var(--danger, #dc2626);
    background: color-mix(in srgb, var(--danger, #dc2626) 10%, transparent);
}

/* ============================================
   DESKTOP: Feste Sidebar links (ab 1025px)
   Mobile & Tablet (≤1024px): Toggle + Overlay
   ============================================ */

/* Früher Layout-Shell: Sidebar-Platz reservieren, bevor menu.js mountet */
@media (min-width: 1025px) {
    html.app-authenticated body:not(.has-app-menu) .container {
        margin: 0 !important;
        margin-left: var(--menu-sidebar-width) !important;
        width: calc(100% - var(--menu-sidebar-width)) !important;
        max-width: none !important;
        min-height: 100vh;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    html.app-authenticated body:not(.has-app-menu)::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: var(--menu-sidebar-width);
        height: 100%;
        background: var(--surface, #ffffff);
        border-right: 1px solid var(--border, #e6e6e6);
        z-index: 9990;
        pointer-events: none;
    }
}

/* Seitenübergang bei Menü-Navigation (Browser ohne View Transitions, theme.css) */
html.app-leaving .container {
    opacity: 0;
    transition: opacity var(--menu-page-transition);
}

html.app-entering .container {
    opacity: 0;
}

html.app-entering.app-entering-active .container {
    opacity: 1;
    transition: opacity 0.22s ease;
}

@media (min-width: 1025px) {
    body.has-app-menu {
        padding: 0 !important;
    }

    body.has-app-menu #menu-sidebar {
        transform: translateX(0);
        box-shadow: none;
        border-right: 1px solid var(--border, #e6e6e6);
    }

    body.has-app-menu #menu-placeholder .menu-toggle,
    body.has-app-menu #menu-sidebar .menu-close,
    body.has-app-menu #menu-overlay {
        display: none;
    }

    body.has-app-menu #menu-sidebar .menu-rail-toggle { display: flex; }

    body.has-app-menu #menu-placeholder {
        width: 0;
        height: 0;
        overflow: hidden;
    }

    body.has-app-menu .container {
        margin: 0 !important;
        margin-left: var(--menu-sidebar-width) !important;
        width: calc(100% - var(--menu-sidebar-width)) !important;
        max-width: none !important;
        min-height: 100vh;
        padding: 0 !important;
        border-radius: 0 !important;
        transition: margin-left var(--t, .18s), width var(--t, .18s);
    }

    /* ---------- Icon-Leiste (PP-304) ----------
       Eingeklappt bleiben nur Icons; Texte stehen weiter für Screenreader im DOM,
       Tooltip kommt aus dem title-Attribut. Sektionen sind hier immer offen. */
    html.menu-collapsed { --menu-sidebar-width: var(--menu-rail-width); }

    html.menu-collapsed #menu-sidebar .menu-header {
        justify-content: center;
        padding: 12px 0;
    }

    html.menu-collapsed #menu-sidebar .menu-header h3,
    html.menu-collapsed #menu-sidebar .menu-header-actions > :not(.menu-rail-toggle),
    html.menu-collapsed #menu-sidebar .menu-az-section,
    html.menu-collapsed #menu-sidebar .menu-user-text {
        display: none;
    }

    html.menu-collapsed #menu-sidebar .menu-section-title {
        width: auto;
        height: 1px;
        margin: 10px 16px;
        padding: 0;
        overflow: hidden;
        font-size: 0;
        background: var(--border, #e6e6e6);
        pointer-events: none;
    }

    html.menu-collapsed #menu-sidebar .menu-section-title > * { display: none; }

    html.menu-collapsed #menu-sidebar .menu-section.is-collapsed .menu-section-items { display: block; }

    html.menu-collapsed #menu-sidebar .menu-item {
        justify-content: center;
        padding: 12px 0;
    }

    html.menu-collapsed #menu-sidebar .menu-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    html.menu-collapsed #menu-sidebar .menu-user {
        flex-direction: column;
        padding: 10px 0;
    }

    html.menu-collapsed #menu-sidebar .menu-user-link {
        flex: 0 0 auto;
        justify-content: center;
        padding: 6px;
    }

    html.menu-collapsed body:not(.has-app-menu)::before {
        width: var(--menu-rail-width);
    }
}

@media (prefers-reduced-motion: reduce) {
    #menu-sidebar,
    body.has-app-menu .container {
        transition: none;
    }
}

/* ============================================
   BOTTOM-NAVIGATION AM HANDY (PP-304)
   Gerendert von menu.js bei mindestens zwei Fulfillment-Rechten.
   Auf Scan-Detailseiten ausgeblendet – dort zählt nur der Scan.
   ============================================ */
.bottom-nav { display: none; }

@media (max-width: 767px) {
    body.has-bottom-nav:not(.picklist-detail-page) {
        padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)) !important;
    }

    body.has-bottom-nav:not(.picklist-detail-page) .bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 85;          /* unter .fab (90), Sheets (1000) und Menü */
        display: flex;
        align-items: stretch;
        height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
        padding: 0 4px env(safe-area-inset-bottom);
        box-sizing: border-box;
        background: var(--glass-bg, var(--surface));
        border-top: 1px solid var(--glass-border, var(--border));
        -webkit-backdrop-filter: var(--glass-blur, none);
        backdrop-filter: var(--glass-blur, none);
    }

    body.has-bottom-nav:not(.picklist-detail-page) .fab {
        bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom));
    }

    body.has-bottom-nav:not(.picklist-detail-page) .status-bar {
        bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    }
}

.bottom-nav-item {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    margin: 0;
    padding: 6px 2px;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bottom-nav-item span {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bottom-nav-item.menu-item-active { color: var(--text); }
.bottom-nav-item.menu-item-active svg { color: var(--brand-500); }

/* Aktiver Eintrag: kurzer roter Strich oben */
.bottom-nav-item.menu-item-active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 24px;
    height: 3px;
    border-radius: 0 0 var(--r-pill) var(--r-pill);
    background: var(--brand-500);
    transform: translateX(-50%);
}

.bottom-nav-item:active { background: color-mix(in srgb, var(--text) 6%, transparent); }

/* ============================================
   BEFEHLSPALETTE Strg+K (PP-304) – common/command-palette.js
   ============================================ */
.cmdp-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;           /* über Menü (9999) */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
    background: var(--modal-scrim);
    opacity: 0;
    transition: opacity var(--t);
}

.cmdp-backdrop[hidden] { display: none; }
.cmdp-backdrop.is-open { opacity: 1; }

.cmdp {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 620px;
    max-height: 70vh;
    overflow: hidden;
    color: var(--text);
    font-family: var(--font);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    box-shadow: var(--elev-3);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    transform: translateY(-8px) scale(.98);
    transition: transform var(--t-spring);
}

.cmdp-backdrop.is-open .cmdp { transform: none; }

.cmdp-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
}

.cmdp-search-icon { flex-shrink: 0; color: var(--text-faint); }

.cmdp-search .cmdp-input {
    flex: 1;
    min-width: 0;
    height: 56px;
    padding: 0;
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    outline: none;
}

.cmdp-search .cmdp-input:focus { box-shadow: none; background: transparent; }

.cmdp kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    padding: 2px 6px;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-xs);
}

.cmdp-list {
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    list-style: none;
}

.cmdp-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
}

.cmdp-option[aria-selected="true"] { background: var(--brand-50); }

.cmdp-option-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-xs);
}

.cmdp-option[aria-selected="true"] .cmdp-option-icon {
    color: var(--on-brand);
    background: var(--brand-grad-btn);
    border-color: transparent;
}

.cmdp-option-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cmdp-option-hint {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 12px;
}

.cmdp-empty {
    padding: 24px 12px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

.cmdp-footer {
    display: flex;
    gap: 16px;
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
}

.cmdp-footer kbd { margin-right: 2px; }

@media (max-width: 767px) {
    .cmdp-backdrop { padding: 8px; }
    .cmdp { max-height: calc(100dvh - 16px); }
    .cmdp-footer, .cmdp-kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cmdp-backdrop, .cmdp { transition: none; }
}
