.command-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.command-palette {
    width: 560px;
    max-width: 90vw;
    background: var(--lux-surface, #fff);
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: palette-in 0.15s ease-out;
}

@keyframes palette-in {
    from { opacity: 0; transform: scale(0.96) translateY(-8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.command-palette-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--surface-tertiary, #e2e8f0);
    gap: 10px;
}

.command-palette-search-icon {
    color: var(--text-muted, #94a3b8);
    font-size: 16px;
    flex-shrink: 0;
}

.command-palette-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-primary, #1e293b);
    background: transparent;
    font-family: inherit;
}

.command-palette-input::placeholder {
    color: var(--text-muted, #94a3b8);
}

.command-palette-esc {
    font-size: 11px;
    padding: 2px 6px;
    background: var(--lux-surface-alt, #f1f5f9);
    border: 1px solid var(--surface-tertiary, #e2e8f0);
    border-radius: 4px;
    color: var(--text-muted, #64748b);
    font-family: inherit;
    flex-shrink: 0;
}

.command-palette-results {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
}

.command-palette-results:empty::after {
    content: 'No results found';
    display: block;
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted, #94a3b8);
    font-size: 14px;
}

.command-palette-group-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #94a3b8);
    padding: 8px 12px 4px;
}

.command-palette-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    gap: 12px;
    text-decoration: none;
    color: var(--text-secondary, #334155);
    transition: background 0.1s;
}

.command-palette-item:hover,
.command-palette-item.selected {
    background: var(--lux-surface-alt, #f1f5f9);
    color: var(--text-primary, #1e293b);
}

.command-palette-item.selected {
    background: var(--info-soft, #e0e7ff);
}

.command-palette-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--lux-surface-alt, #f1f5f9);
    color: var(--text-muted, #64748b);
    font-size: 14px;
    flex-shrink: 0;
}

.command-palette-item.selected .command-palette-item-icon {
    background: #c7d2fe;
    color: #4338ca;
}

.command-palette-item-label {
    font-size: 14px;
    font-weight: 500;
}

.command-palette-item-path {
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
    margin-left: auto;
    flex-shrink: 0;
}

.command-palette-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    border-top: 1px solid var(--surface-tertiary, #e2e8f0);
    background: var(--lux-surface-alt, #f8fafc);
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
}

.command-palette-footer kbd {
    font-size: 11px;
    padding: 1px 4px;
    background: var(--lux-surface, #fff);
    border: 1px solid var(--surface-tertiary, #e2e8f0);
    border-radius: 3px;
    color: var(--text-muted, #64748b);
    margin: 0 2px;
    font-family: inherit;
}

.global-search-wrapper {
    display: flex;
    align-items: center;
    background: var(--lux-surface-alt, #f1f5f9);
    border: 1px solid var(--surface-tertiary, #e2e8f0);
    border-radius: 8px;
    padding: 6px 12px;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 180px;
}

.global-search-wrapper:focus-within {
    border-color: var(--info, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: var(--lux-surface, #fff);
}

.global-search-icon {
    color: var(--text-muted, #94a3b8);
    font-size: 13px;
    flex-shrink: 0;
}

.global-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--text-primary, #1e293b);
    font-family: inherit;
    min-width: 100px;
}

.global-search-input::placeholder {
    color: var(--text-muted, #94a3b8);
}

.global-search-kbd {
    font-size: 11px;
    padding: 1px 6px;
    background: var(--lux-surface, #fff);
    border: 1px solid var(--surface-tertiary, #e2e8f0);
    border-radius: 4px;
    color: var(--text-muted, #94a3b8);
    font-family: inherit;
    flex-shrink: 0;
}

.cmd-palette-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--lux-surface-alt, #f1f5f9);
    border: 1px solid var(--surface-tertiary, #e2e8f0);
    border-radius: 8px;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
    white-space: nowrap;
}

.cmd-palette-trigger:hover {
    background: var(--surface-tertiary, #e2e8f0);
    color: var(--text-secondary, #334155);
}

.cmd-palette-trigger kbd {
    font-size: 11px;
    padding: 1px 4px;
    background: var(--lux-surface, #fff);
    border: 1px solid var(--surface-tertiary, #e2e8f0);
    border-radius: 3px;
    color: var(--text-muted, #94a3b8);
    font-family: inherit;
}

.header-help-btn {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--lux-surface-alt, #f1f5f9);
    border-radius: 8px;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    .global-search-wrapper {
        display: none;
    }
    .cmd-palette-trigger kbd {
        display: none;
    }
}

.user-menu-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--surface-tertiary, #e2e8f0);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-menu-header strong {
    font-size: 13px;
    color: var(--text-primary, #1e293b);
}

.user-menu-header span {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
}
